Skip to content

Build scilus/actions-runner image #10

Build scilus/actions-runner image

Build scilus/actions-runner image #10

name: Build scilus/actions-runner image
on:
workflow_dispatch:
schedule:
- cron: "0 2 * * *" # Runs at 02:00 every day
jobs:
build-action-runner:
runs-on: scilus-org-runners
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ksivamuthu/actions-setup-gh-cli@v3
# From : https://github.com/actions/actions-runner-controller/blob/0bfa57ac504dfc818128f7185fc82830cbdb83f1/.github/workflows/arc-update-runners-scheduled.yaml#L14
- name: actions-runner version
id: github-runner
run: |
CURRENT_VERSION=$(echo -n $(cat runner/VERSION | grep 'RUNNER_VERSION=' | cut -d '=' -f2))
LATEST_VERSION=$(gh release list --exclude-drafts --exclude-pre-releases --limit 1 -R actions/runner | grep -oP '(?<=v)[0-9.]+' | head -1)
echo ::set-output name=current_version::$CURRENT_VERSION"
echo ::set-output name=latest_version::$LATEST_VERSION"
- name: VTK version
id: vtk-version
run: |
version=$(cat versioning.hcl | grep vtk-version | sed 's/vtk-version="\(.*\)"/\1/')
echo "version=$version" >> $GITHUB_OUTPUT
- name: build
if: ${{ steps.github-runner.outputs.current_version }} != ${{ steps.github-runner.outputs.latest_version }}
uses: ./docker-builder.yml
with:
target: actions-runner
tag: ${{ steps.github-runner.outputs.latest_version }}-vtk${{ steps.vtk-version.outputs.version }}
update-latest: true
disable-builddate-tag: true
actions-runner-version: ${{ steps.github-runner.outputs.latest_version }}