Skip to content

update-runner-version #276

update-runner-version

update-runner-version #276

---
name: update-runner-version
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
permissions:
contents: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get runner version
run: |
echo RUNNER_LATEST=$(curl -s "https://api.github.com/repos/actions/runner/releases/latest" | jq '.tag_name[1:]' --raw-output) >> $GITHUB_ENV
- name: Bump runner version
run: |
find . -type f -name "Dockerfile" -exec sed -i 's/ARG RUNNER_VERSION="[^"]*"/ARG RUNNER_VERSION="${{ env.RUNNER_LATEST }}"/g' {} \;
- name: Create Pull Request
id: pr
uses: peter-evans/create-pull-request@v5
with:
commit-message: 'chore: Bump Github actions self-hosted runner version'
title: 'feat: Bump Github actions self-hosted runner version'
body: |
New version of Github actions self-hosted was [released](https://github.com/actions/runner/releases/tag/v${{ env.RUNNER_LATEST }})
base: main
branch: feat/update-runner-version
delete-branch: true