From 8f2ec6c6719761fbf08ca5ebc543d076e03e3d97 Mon Sep 17 00:00:00 2001 From: ChristophShyper <45788587+ChristophShyper@users.noreply.github.com> Date: Fri, 21 Nov 2025 22:31:48 +0100 Subject: [PATCH] :zap: Sync workflows with template --- .github/dependabot.yml | 8 +++ .../workflows/auto-create-pull-request.yml | 6 +- .github/workflows/auto-create-release.yml | 2 +- .github/workflows/cron-check-dependencies.yml | 2 +- .../workflows/manual-sync-common-files.yml | 58 +++++++++++++++++++ .github/workflows/manual-update-version.yml | 2 +- Taskfile.cicd.yml | 18 +++++- Taskfile.variables.yml | 1 - 8 files changed, 88 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/manual-sync-common-files.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fe8f719..96ca957 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,3 +15,11 @@ updates: interval: weekly assignees: - ChristophShyper + +# # Enable version updates for pip +# - package-ecosystem: pip +# directory: / +# schedule: +# interval: daily +# assignees: +# - ChristophShyper diff --git a/.github/workflows/auto-create-pull-request.yml b/.github/workflows/auto-create-pull-request.yml index dc2d08c..20ce420 100644 --- a/.github/workflows/auto-create-pull-request.yml +++ b/.github/workflows/auto-create-pull-request.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-24.04-arm steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 fetch-tags: true @@ -36,7 +36,7 @@ jobs: needs: [lint] steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 fetch-tags: true @@ -74,7 +74,7 @@ jobs: runs-on: ubuntu-24.04-arm steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 fetch-tags: true diff --git a/.github/workflows/auto-create-release.yml b/.github/workflows/auto-create-release.yml index a482e35..84578e6 100644 --- a/.github/workflows/auto-create-release.yml +++ b/.github/workflows/auto-create-release.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-24.04-arm steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 fetch-tags: true diff --git a/.github/workflows/cron-check-dependencies.yml b/.github/workflows/cron-check-dependencies.yml index e028662..57f98ea 100644 --- a/.github/workflows/cron-check-dependencies.yml +++ b/.github/workflows/cron-check-dependencies.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-24.04-arm steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 fetch-tags: true diff --git a/.github/workflows/manual-sync-common-files.yml b/.github/workflows/manual-sync-common-files.yml new file mode 100644 index 0000000..1b3c62d --- /dev/null +++ b/.github/workflows/manual-sync-common-files.yml @@ -0,0 +1,58 @@ +name: (Manual) Sync Common Files + +on: + workflow_dispatch: + inputs: + type: + description: File type to sync + required: true + default: all + type: choice + options: + - all + - configs + - ignores + - taskfiles + - workflows + +permissions: + contents: write + pull-requests: write + +jobs: + update: + name: Sync common files and create pull request + runs-on: ubuntu-24.04-arm + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Install Task + uses: arduino/setup-task@v2.0.0 + with: + version: 3.x + + - name: Sync files and get PR template + id: version + run: | + task sync:${{ github.event.inputs.type }} + task git:set-config + task git:get-pr-template + + - name: Push to release branch + uses: devops-infra/action-commit-push@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + commit_message: ":art: Sync common files with action-template repository" + target_branch: ${{ format('release/{0}', steps.version.outputs.REL_VERSION) }} + + - name: Create Pull Request + uses: devops-infra/action-pull-request@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + assignee: ${{ github.actor }} + template: .tmp/PULL_REQUEST_TEMPLATE.md + get_diff: true diff --git a/.github/workflows/manual-update-version.yml b/.github/workflows/manual-update-version.yml index 467ee91..f583a11 100644 --- a/.github/workflows/manual-update-version.yml +++ b/.github/workflows/manual-update-version.yml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-24.04-arm steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 fetch-tags: true diff --git a/Taskfile.cicd.yml b/Taskfile.cicd.yml index f21c9c8..7e33379 100644 --- a/Taskfile.cicd.yml +++ b/Taskfile.cicd.yml @@ -2,6 +2,10 @@ version: '3' silent: true +vars: + PR_TEMPLATE: https://raw.githubusercontent.com/devops-infra/.github/master/PULL_REQUEST_TEMPLATE.md + TEMPLATE_REPO_BASE_URL: https://raw.githubusercontent.com/devops-infra/template-action/refs/heads/master + tasks: pre-commit: desc: Run all pre-commit hooks @@ -228,6 +232,7 @@ tasks: curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.pre-commit-config.yaml -o ./.pre-commit-config.yaml curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.shellcheckrc -o ./.shellcheckrc curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.yamllint.yml -o ./.yamllint.yml + git add .editorconfig .hadolint.yaml .pre-commit-config.yaml .shellcheckrc .yamllint.yml echo "✅ Synced configuration files" sync:ignores: @@ -237,6 +242,7 @@ tasks: echo "▶️ Syncing ignore files from template-action..." curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.gitignore -o ./.gitignore curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.dockerignore -o ./.dockerignore + git add .gitignore .dockerignore echo "✅ Synced ignore files" sync:taskfiles: @@ -248,6 +254,7 @@ tasks: curl -sL {{.TEMPLATE_REPO_BASE_URL}}/Taskfile.cicd.yml -o ./Taskfile.cicd.yml curl -sL {{.TEMPLATE_REPO_BASE_URL}}/Taskfile.docker.yml -o ./Taskfile.docker.yml curl -sL {{.TEMPLATE_REPO_BASE_URL}}/Taskfile.variables.yml -o ./Taskfile.variables.yml + git add Taskfile*.yml echo "✅ Synced Taskfiles" sync:workflows: @@ -258,8 +265,15 @@ tasks: mkdir -p .github/workflows curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/auto-create-pull-request.yml \ -o ./.github/workflows/auto-create-pull-request.yml - curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/auto-create-release.yml -o ./.github/workflows/auto-create-release.yml + curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/auto-create-release.yml \ + -o ./.github/workflows/auto-create-release.yml curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/cron-check-dependencies.yml \ -o ./.github/workflows/cron-check-dependencies.yml - curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/manual-update-version.yml -o ./.github/workflows/manual-update-version.yml + curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/manual-sync-common-files.yml \ + -o ./.github/workflows/manual-sync-common-files.yml + curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/workflows/manual-update-version.yml \ + -o ./.github/workflows/manual-update-version.yml + curl -sL {{.TEMPLATE_REPO_BASE_URL}}/.github/dependabot.yml \ + -o ./.github/dependabot.yml + git add .github/workflows/ echo "✅ Synced GitHub workflows" diff --git a/Taskfile.variables.yml b/Taskfile.variables.yml index e0ed9fa..f597bf6 100644 --- a/Taskfile.variables.yml +++ b/Taskfile.variables.yml @@ -127,7 +127,6 @@ vars: else git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown" fi - PR_TEMPLATE: https://raw.githubusercontent.com/devops-infra/.github/master/PULL_REQUEST_TEMPLATE.md # Labels for http://label-schema.org/rc1/#build-time-labels # And for https://github.com/opencontainers/image-spec/blob/master/annotations.md