Skip to content

Commit 3093138

Browse files
refactor: standardize workflows to use centralized reusable callers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e4b66d4 commit 3093138

File tree

5 files changed

+39
-327
lines changed

5 files changed

+39
-327
lines changed

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

Lines changed: 7 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches-ignore:
66
- master
7+
- main
78
- dependabot/**
89

910
permissions:
@@ -12,83 +13,9 @@ permissions:
1213
pull-requests: write
1314

1415
jobs:
15-
lint:
16-
name: Lint
17-
runs-on: ubuntu-24.04-arm
18-
steps:
19-
- name: Checkout
20-
uses: actions/checkout@v6
21-
with:
22-
fetch-depth: 0
23-
fetch-tags: true
24-
25-
- name: Install Task
26-
uses: arduino/setup-task@v2.0.0
27-
with:
28-
version: 3.x
29-
30-
- name: Run linters
31-
run: task lint
32-
33-
build-and-push:
34-
name: Build and push
35-
runs-on: ubuntu-24.04-arm
36-
needs: [lint]
37-
steps:
38-
- name: Checkout
39-
uses: actions/checkout@v6
40-
with:
41-
fetch-depth: 0
42-
fetch-tags: true
43-
44-
- name: Install Task
45-
uses: arduino/setup-task@v2.0.0
46-
with:
47-
version: 3.x
48-
49-
- name: Install Docker Buildx
50-
uses: docker/setup-buildx-action@v4
51-
52-
- name: Install QEMU
53-
uses: docker/setup-qemu-action@v4
54-
with:
55-
image: tonistiigi/binfmt:latest
56-
platforms: amd64,arm64
57-
58-
- name: Get Docker commands
59-
run: task docker:cmds
60-
61-
- name: Build and push test image
62-
env:
63-
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
64-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65-
run: task docker:push
66-
67-
- name: Inspect image
68-
run: task docker:push:inspect
69-
70-
pull-request:
71-
name: Pull Request
72-
runs-on: ubuntu-24.04-arm
73-
steps:
74-
- name: Checkout
75-
uses: actions/checkout@v6
76-
with:
77-
fetch-depth: 0
78-
fetch-tags: true
79-
80-
- name: Install Task
81-
uses: arduino/setup-task@v2.0.0
82-
with:
83-
version: 3.x
84-
85-
- name: Get template
86-
run: task git:get-pr-template
87-
88-
- name: Create Pull Request
89-
uses: devops-infra/action-pull-request@v1
90-
with:
91-
github_token: ${{ secrets.GITHUB_TOKEN }}
92-
assignee: ${{ github.actor }}
93-
template: .tmp/PULL_REQUEST_TEMPLATE.md
94-
get_diff: true
16+
call:
17+
uses: devops-infra/.github/.github/workflows/reusable-auto-create-pull-request.yml@v1
18+
with:
19+
profile: actions
20+
secrets:
21+
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}

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

Lines changed: 0 additions & 99 deletions
This file was deleted.
Lines changed: 11 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,19 @@
1-
name: (Cron) Check dependencies
1+
name: (Cron) Weekly repository health
22

33
on:
44
schedule:
5-
# Run every Monday at 08:00 UTC
6-
- cron: 0 8 * * 1
5+
- cron: 0 5 * * 1
6+
workflow_dispatch:
77

88
permissions:
99
contents: read
10-
packages: write
10+
issues: write
11+
pull-requests: read
1112

1213
jobs:
13-
dependency-check:
14-
name: Test dependencies
15-
runs-on: ubuntu-24.04-arm
16-
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v6
19-
with:
20-
fetch-depth: 0
21-
fetch-tags: true
22-
23-
- name: Install Task
24-
uses: arduino/setup-task@v2.0.0
25-
with:
26-
version: 3.x
27-
28-
- name: Install Docker Buildx
29-
uses: docker/setup-buildx-action@v4
30-
31-
- name: Install QEMU
32-
uses: docker/setup-qemu-action@v4
33-
with:
34-
image: tonistiigi/binfmt:latest
35-
platforms: amd64,arm64
36-
37-
- name: Run linters
38-
run: task lint
39-
40-
- name: Get Docker commands
41-
run: task docker:cmds
42-
43-
- name: Build and push test image
44-
env:
45-
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
run: task docker:push
48-
49-
- name: Inspect image
50-
run: task docker:push:inspect
14+
call:
15+
uses: devops-infra/.github/.github/workflows/reusable-cron-check-dependencies.yml@v1
16+
with:
17+
profile: actions
18+
secrets:
19+
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}

.github/workflows/manual-sync-common-files.yml

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,46 +13,14 @@ on:
1313
- configs
1414
- ignores
1515
- taskfiles
16-
- workflows
1716

1817
permissions:
1918
contents: write
2019
pull-requests: write
2120

2221
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/setup-task@v2.0.0
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
22+
call:
23+
uses: devops-infra/.github/.github/workflows/reusable-manual-sync-common-files.yml@v1
24+
with:
25+
sync-type: ${{ inputs.type }}
26+
template-profile: actions

0 commit comments

Comments
 (0)