Skip to content

Commit 2f114f8

Browse files
authored
fix GHA runner version updater workflow and enable it (#3417)
[static] Signed-off-by: Mateusz Błażejewski <mateusz.blazejewski@digitalasset.com>
1 parent 99c5cef commit 2f114f8

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

.github/workflows/bump_gha_runner_version.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
1-
name: Bump GHA runner version (WIP)
1+
name: Bump GHA runner version
22
on:
3-
# schedule:
4-
# - cron: '30 6 1,15 * *' # Monthly on the 1st and 15th at 06:30
3+
schedule:
4+
- cron: '30 6 1,15 * *' # Monthly on the 1st and 15th at 06:30
55
workflow_dispatch:
66

77
jobs:
88
bump_gha_runner_version:
9-
runs-on: ubuntu-24.04
109
name: Bump GHA runner version
10+
runs-on: self-hosted-k8s-small
11+
container:
12+
image: us-central1-docker.pkg.dev/da-cn-shared/ghcr/digital-asset/decentralized-canton-sync-dev/docker/splice-test-ci:0.3.12
1113
steps:
1214
- name: Checkout code
1315
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
17+
- name: Setup
18+
shell: bash
19+
run: ./.github/actions/scripts/common_setup.sh
20+
21+
- name: Set up Nix (Self hosted)
22+
uses: ./.github/actions/nix/setup_nix
23+
with:
24+
cache_version: 7
25+
artifactory_user: dummy
26+
artifactory_password: dummy
1427

1528
- name: Check for the latest version and create a PR to splice
1629
uses: ./.github/actions/nix/run_bash_command_in_nix
1730
with:
1831
cmd: |
1932
git config user.email "splice-maintainers@digitalasset.com"
2033
git config user.name "DA Automation"
21-
./scripts/bump_gha_runner_version.sh
34+
./scripts/bump-gha-runner-version.sh
2235
additional_nix_args: "--keep GH_TOKEN"
2336
env:
2437
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

scripts/bump-gha-runner-version.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ runner_digest=$(
1919
| yq '.Digest'
2020
)
2121

22+
echo "The newest available image is ghcr.io/actions/actions-runner:${runner_version}@${runner_digest}"
23+
2224
docker_runner_file="${SPLICE_ROOT}/cluster/images/splice-test-docker-runner/Dockerfile"
2325
runner_hook_file="${SPLICE_ROOT}/cluster/images/splice-test-runner-hook/Dockerfile"
2426

@@ -34,10 +36,14 @@ if git diff --exit-code --quiet "${docker_runner_file}" "${runner_hook_file}"; t
3436
exit 0
3537
fi
3638

39+
echo "GHA runner version is not up to date. Testing image build..."
40+
3741
make --directory "${SPLICE_ROOT}" --jobs \
3842
cluster/images/splice-test-docker-runner/docker-build \
3943
cluster/images/splice-test-runner-hook/docker-build
4044

45+
echo "Creating a PR..."
46+
4147
git add --all
4248
updated_branch="gha-runner-version-bump-$(date +%Y-%m-%d)"
4349
git switch -c "${updated_branch}"
@@ -50,3 +56,5 @@ gh pr create \
5056
--title "Bump GHA runner version to the latest (auto-generated)" \
5157
--body "" \
5258
--reviewer isegall-da,martinflorian-da,ray-roestenburg-da,mblaze-da
59+
60+
echo "Done."

0 commit comments

Comments
 (0)