From b39bd105908f9c8bfbf1a9a5356b161dfaa9ccb1 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 7 May 2025 21:48:48 -0700 Subject: [PATCH 1/4] ci/gha: fix exclusion rules Commit 874207492 neglects to update the exclusion rules when bumping Go releases, and so we no longer exclude running on actuated with older Go release, or running with criu-dev with older Go release. Fixes: 874207492 ("CI: add Go 1.24, drop go1.22") Signed-off-by: Kir Kolyshkin --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 60289a270..a5d9347d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,12 +32,12 @@ jobs: # Disable most of criu-dev jobs, as they are expensive # (need to compile criu) and don't add much value/coverage. - criu: criu-dev - go-version: 1.22.x + go-version: 1.23.x - criu: criu-dev rootless: rootless - criu: criu-dev race: -race - - go-version: 1.22.x + - go-version: 1.23.x os: actuated-arm64-6cpu-8gb - race: "-race" os: actuated-arm64-6cpu-8gb From 62e6ab6dda2da97a7c81a346213ac7f3f3300b02 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 7 May 2025 20:21:22 -0700 Subject: [PATCH 2/4] gha/ci: allow validate/all-done to succeed for non-PRs When we run CI not on a pull request, the commit job is skipped, as a result, all-done is also skipped. To allow all-done to succeed, modify the commit job to succeed for non-PRs. Signed-off-by: Kir Kolyshkin --- .github/workflows/validate.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 296f45085..f1ac3536b 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -157,22 +157,26 @@ jobs: contents: read pull-requests: read runs-on: ubuntu-24.04 - # Only check commits on pull requests. - if: github.event_name == 'pull_request' steps: - name: get pr commits + if: github.event_name == 'pull_request' # Only check commits on pull requests. id: 'get-pr-commits' uses: tim-actions/get-pr-commits@v1.3.1 with: token: ${{ secrets.GITHUB_TOKEN }} - name: check subject line length + if: github.event_name == 'pull_request' # Only check commits on pull requests. uses: tim-actions/commit-message-checker-with-regex@v0.3.2 with: commits: ${{ steps.get-pr-commits.outputs.commits }} pattern: '^.{0,72}(\n.*)*$' error: 'Subject too long (max 72)' + - name: succeed (not a PR) # Allow all-done to succeed for non-PRs. + if: github.event_name != 'pull_request' + run: echo "Nothing to check here." + cfmt: runs-on: ubuntu-24.04 steps: From 74209b739dba0b03fefb4698760c6b3602adb4f9 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 7 May 2025 21:56:16 -0700 Subject: [PATCH 3/4] ci/gha: allow to run jobs manually ... or from another job. Signed-off-by: Kir Kolyshkin --- .github/workflows/test.yml | 1 + .github/workflows/validate.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a5d9347d3..2b2ddf6bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,7 @@ on: - main - release-* pull_request: + workflow_dispatch: permissions: contents: read diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index f1ac3536b..8532d0fc4 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -7,6 +7,7 @@ on: - main - release-* pull_request: + workflow_dispatch: env: GO_VERSION: 1.24 permissions: From 995a39a4cb0f611c1973b3af7753cee8c7a61511 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 6 May 2025 15:22:08 -0700 Subject: [PATCH 4/4] ci: add scheduled run of GHA CI This is to ensure that our CI is not rotting away even if there are no new PRs or merges. This is especially useful for release branches which tend to cease working over time due to some external reasons. Signed-off-by: Kir Kolyshkin --- .github/workflows/scheduled.yml | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/scheduled.yml diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml new file mode 100644 index 000000000..f310503c5 --- /dev/null +++ b/.github/workflows/scheduled.yml @@ -0,0 +1,35 @@ +# This enables periodical execution of CI jobs in branches we maintain. +# +# CI jobs are triggered through here (instead of adding "schedule:" to the +# appropriate files) because scheduled jobs are only run on the main branch. +# In other words, it's a way to run periodical CI for other branches. + +name: scheduled +on: + schedule: + # Runs at 00:00 UTC every Sunday, Tuesday, Thursday. + - cron: '0 0 * * 0,2,4' + workflow_dispatch: +permissions: + contents: read + actions: write + +jobs: + trigger-workflow: + strategy: + matrix: + branch: ["main", "release-1.3"] + wf_id: ["validate.yml", "test.yml"] + runs-on: ubuntu-latest + steps: + - name: Trigger ${{ matrix.wf_id }} workflow on ${{ matrix.branch}} branch + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: '${{ matrix.wf_id }}', + ref: '${{ matrix.branch }}' + });