Skip to content

Commit bfe2aa6

Browse files
feat: add initial templates and sync workflow
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
1 parent e52afcd commit bfe2aa6

12 files changed

Lines changed: 453 additions & 0 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @radius-project/on-call

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# yaml-language-server: $schema=https://www.schemastore.org/dependabot-2.0.json
2+
# See GitHub's documentation for more information on this file:
3+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference
4+
---
5+
version: 2
6+
7+
updates:
8+
- package-ecosystem: github-actions
9+
directories:
10+
- /
11+
- workflow-templates
12+
schedule:
13+
interval: weekly
14+
commit-message:
15+
prefix: ci
16+
include: scope
17+
groups:
18+
all:
19+
patterns: ["*"]

.github/ghalint.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/suzuki-shunsuke/ghalint/main/json-schema/ghalint.json
2+
---
3+
excludes:
4+
- policy_name: github_app_should_limit_repositories
5+
workflow_file_path: .github/workflows/sync.yml
6+
job_name: sync
7+
step_id: get-token

.github/sync.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# docs: https://github.com/PaddleHQ/repo-file-sync-action?tab=readme-ov-file#advanced-sync-config
2+
# nunjucks template: https://mozilla.github.io/nunjucks/templating.html
3+
---
4+
group:
5+
# source: https://github.com/orgs/radius-project/repositories?q=archived%3Afalse+sort%3Aname-asc
6+
repos: |
7+
radius-project/.github
8+
radius-project/bicep-types-aws
9+
radius-project/blog
10+
radius-project/community
11+
radius-project/dashboard
12+
radius-project/design-notes
13+
radius-project/docs@edge
14+
radius-project/lab
15+
radius-project/radius
16+
radius-project/recipes
17+
radius-project/resource-types-contrib
18+
radius-project/roadmap
19+
radius-project/samples@edge
20+
radius-project/terraform-private-modules
21+
radius-project/website
22+
23+
files:
24+
- source: sync-templates/LICENSE
25+
dest: LICENSE
26+
27+
- source: sync-templates/.gitattributes
28+
dest: .gitattributes
29+
30+
- source: sync-templates/.editorconfig
31+
dest: .editorconfig
32+
33+
- source: workflow-templates/dependency-review.yml
34+
dest: .github/workflows/dependency-review.yml
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json
2+
# docs:
3+
# - https://github.com/actions/dependency-review-action
4+
# - https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-review-action
5+
---
6+
name: __dependency-review
7+
8+
on:
9+
workflow_call:
10+
11+
permissions: {}
12+
13+
jobs:
14+
dependency-review:
15+
runs-on: ubuntu-24.04
16+
timeout-minutes: 5
17+
permissions:
18+
contents: read
19+
pull-requests: write
20+
checks: write
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
24+
with:
25+
persist-credentials: false
26+
27+
- name: Run Dependency Review
28+
uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261 # v4.8.2
29+
with:
30+
comment-summary-in-pr: always
31+
retry-on-snapshot-warnings: true
32+
warn-on-openssf-scorecard-level: 4

.github/workflows/sync.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json
2+
---
3+
name: Sync
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
paths:
10+
- .github/workflows/sync.yml
11+
- .github/sync.yml
12+
- sync-templates/**
13+
- workflow-templates/*.yaml
14+
- workflow-templates/*.yml
15+
16+
permissions: {}
17+
18+
concurrency:
19+
group: ${{ format('{0}-{1}-{2}-{3}-{4}', github.workflow, github.event_name, github.ref, github.base_ref, github.head_ref) }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
sync:
24+
name: Sync
25+
runs-on: ubuntu-24.04
26+
timeout-minutes: 15
27+
permissions:
28+
contents: read
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
32+
with:
33+
persist-credentials: false
34+
35+
- name: Get App Token
36+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
37+
id: get-token
38+
with:
39+
app-id: ${{ secrets.SYNC_BOT_APP_ID }}
40+
private-key: ${{ secrets.SYNC_BOT_PRIVATE_KEY }}
41+
owner: ${{ github.repository_owner }}
42+
permission-metadata: read
43+
permission-contents: write
44+
permission-pull-requests: write
45+
permission-workflows: write
46+
47+
- name: Get bot details
48+
id: bot-details
49+
uses: raven-actions/bot-details@ee8966a9ff6e7e42cbfc4a56b4ddb60a9d1b40a6 # v1.2.0
50+
with:
51+
bot-slug-name: ${{ steps.get-token.outputs.app-slug }}
52+
set-env: false
53+
54+
- name: Run Repo File Sync
55+
uses: PaddleHQ/repo-file-sync-action@fb024b6e51a36213d16cc4b2c3b51c73b2b5ca70 # v1.26.13
56+
with:
57+
GH_INSTALLATION_TOKEN: ${{ steps.get-token.outputs.token }}
58+
CONFIG_PATH: ./.github/sync.yml
59+
COMMIT_PREFIX: "chore:"
60+
BRANCH_PREFIX: repo-sync
61+
GIT_EMAIL: ${{ steps.bot-details.outputs.email }}
62+
GIT_USERNAME: ${{ steps.bot-details.outputs.name }}

sync-templates/.editorconfig

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
indent_style = space
9+
indent_size = 2
10+
11+
[*.{go,mod}]
12+
indent_style = tab
13+
14+
[*.{tsv}]
15+
indent_style = tab
16+
17+
[*.md]
18+
indent_size = unset
19+
20+
[*.py]
21+
indent_size = 4
22+
23+
[*.ps1]
24+
indent_size = 4
25+
26+
[*.{cmd,bat}]
27+
end_of_line = crlf
28+
29+
[Makefile]
30+
indent_style = tab
31+
32+
[**/node_modules/**]
33+
ignore = true
34+
35+
[**/.venv/**]
36+
ignore = true

sync-templates/.gitattributes

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Force the following filetypes to have unix eols, so Windows does not break them
2+
* text eol=lf
3+
4+
# Declare files that will always have CRLF line endings on checkout.
5+
*.{cmd,[cC][mM][dD]} text eol=crlf
6+
*.{bat,[bB][aA][tT]} text eol=crlf
7+
8+
# Common files
9+
*.pdf binary
10+
11+
# Image files
12+
*.gif binary
13+
*.tif binary
14+
*.ico binary
15+
*.jpg binary
16+
*.jpeg binary
17+
*.png binary
18+
19+
# Microsoft Office documents
20+
*.pptx binary
21+
*.potx binary
22+
*.docx binary
23+
*.dotx binary
24+
*.vsdx binary
25+
26+
# Lock files
27+
package-lock.json linguist-generated=true
28+
pnpm-lock.yaml linguist-generated=true
29+
yarn.lock linguist-generated=true

0 commit comments

Comments
 (0)