Skip to content

Commit d006f67

Browse files
⚡ Sync workflows with template (#107)
Co-authored-by: ChristophShyper <[email protected]>
1 parent bc84b1b commit d006f67

File tree

8 files changed

+88
-9
lines changed

8 files changed

+88
-9
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,11 @@ updates:
1515
interval: weekly
1616
assignees:
1717
- ChristophShyper
18+
19+
# # Enable version updates for pip
20+
# - package-ecosystem: pip
21+
# directory: /
22+
# schedule:
23+
# interval: daily
24+
# assignees:
25+
# - ChristophShyper

.github/workflows/auto-create-pull-request.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-24.04-arm
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v5
20+
uses: actions/checkout@v6
2121
with:
2222
fetch-depth: 0
2323
fetch-tags: true
@@ -36,7 +36,7 @@ jobs:
3636
needs: [lint]
3737
steps:
3838
- name: Checkout
39-
uses: actions/checkout@v5
39+
uses: actions/checkout@v6
4040
with:
4141
fetch-depth: 0
4242
fetch-tags: true
@@ -74,7 +74,7 @@ jobs:
7474
runs-on: ubuntu-24.04-arm
7575
steps:
7676
- name: Checkout
77-
uses: actions/checkout@v5
77+
uses: actions/checkout@v6
7878
with:
7979
fetch-depth: 0
8080
fetch-tags: true

.github/workflows/auto-create-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-24.04-arm
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v5
21+
uses: actions/checkout@v6
2222
with:
2323
fetch-depth: 0
2424
fetch-tags: true

.github/workflows/cron-check-dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-24.04-arm
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v5
18+
uses: actions/checkout@v6
1919
with:
2020
fetch-depth: 0
2121
fetch-tags: true
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: (Manual) Sync Common Files
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
type:
7+
description: File type to sync
8+
required: true
9+
default: all
10+
type: choice
11+
options:
12+
- all
13+
- configs
14+
- ignores
15+
- taskfiles
16+
- workflows
17+
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
22+
jobs:
23+
update:
24+
name: Sync common files and create pull request
25+
runs-on: ubuntu-24.04-arm
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v6
29+
with:
30+
fetch-depth: 0
31+
fetch-tags: true
32+
33+
- name: Install Task
34+
uses: arduino/[email protected]
35+
with:
36+
version: 3.x
37+
38+
- name: Sync files and get PR template
39+
id: version
40+
run: |
41+
task sync:${{ github.event.inputs.type }}
42+
task git:set-config
43+
task git:get-pr-template
44+
45+
- name: Push to release branch
46+
uses: devops-infra/action-commit-push@v1
47+
with:
48+
github_token: ${{ secrets.GITHUB_TOKEN }}
49+
commit_message: ":art: Sync common files with action-template repository"
50+
target_branch: ${{ format('release/{0}', steps.version.outputs.REL_VERSION) }}
51+
52+
- name: Create Pull Request
53+
uses: devops-infra/action-pull-request@v1
54+
with:
55+
github_token: ${{ secrets.GITHUB_TOKEN }}
56+
assignee: ${{ github.actor }}
57+
template: .tmp/PULL_REQUEST_TEMPLATE.md
58+
get_diff: true

.github/workflows/manual-update-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-24.04-arm
2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@v5
31+
uses: actions/checkout@v6
3232
with:
3333
fetch-depth: 0
3434
fetch-tags: true

Taskfile.cicd.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ version: '3'
22

33
silent: true
44

5+
vars:
6+
PR_TEMPLATE: https://raw.githubusercontent.com/devops-infra/.github/master/PULL_REQUEST_TEMPLATE.md
7+
TEMPLATE_REPO_BASE_URL: https://raw.githubusercontent.com/devops-infra/template-action/refs/heads/master
8+
59
tasks:
610
pre-commit:
711
desc: Run all pre-commit hooks
@@ -228,6 +232,7 @@ tasks:
228232
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.pre-commit-config.yaml -o ./.pre-commit-config.yaml
229233
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.shellcheckrc -o ./.shellcheckrc
230234
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.yamllint.yml -o ./.yamllint.yml
235+
git add .editorconfig .hadolint.yaml .pre-commit-config.yaml .shellcheckrc .yamllint.yml
231236
echo "✅ Synced configuration files"
232237
233238
sync:ignores:
@@ -237,6 +242,7 @@ tasks:
237242
echo "▶️ Syncing ignore files from template-action..."
238243
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.gitignore -o ./.gitignore
239244
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.dockerignore -o ./.dockerignore
245+
git add .gitignore .dockerignore
240246
echo "✅ Synced ignore files"
241247
242248
sync:taskfiles:
@@ -248,6 +254,7 @@ tasks:
248254
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/Taskfile.cicd.yml -o ./Taskfile.cicd.yml
249255
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/Taskfile.docker.yml -o ./Taskfile.docker.yml
250256
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/Taskfile.variables.yml -o ./Taskfile.variables.yml
257+
git add Taskfile*.yml
251258
echo "✅ Synced Taskfiles"
252259
253260
sync:workflows:
@@ -258,8 +265,15 @@ tasks:
258265
mkdir -p .github/workflows
259266
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/auto-create-pull-request.yml \
260267
-o ./.github/workflows/auto-create-pull-request.yml
261-
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/auto-create-release.yml -o ./.github/workflows/auto-create-release.yml
268+
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/auto-create-release.yml \
269+
-o ./.github/workflows/auto-create-release.yml
262270
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/cron-check-dependencies.yml \
263271
-o ./.github/workflows/cron-check-dependencies.yml
264-
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/manual-update-version.yml -o ./.github/workflows/manual-update-version.yml
272+
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/manual-sync-common-files.yml \
273+
-o ./.github/workflows/manual-sync-common-files.yml
274+
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/manual-update-version.yml \
275+
-o ./.github/workflows/manual-update-version.yml
276+
curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/dependabot.yml \
277+
-o ./.github/dependabot.yml
278+
git add .github/workflows/
265279
echo "✅ Synced GitHub workflows"

Taskfile.variables.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ vars:
127127
else
128128
git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown"
129129
fi
130-
PR_TEMPLATE: https://raw.githubusercontent.com/devops-infra/.github/master/PULL_REQUEST_TEMPLATE.md
131130
132131
# Labels for http://label-schema.org/rc1/#build-time-labels
133132
# And for https://github.com/opencontainers/image-spec/blob/master/annotations.md

0 commit comments

Comments
 (0)