Skip to content

Update Version

Update Version #570

name: Update Version
on:
workflow_dispatch:
schedule:
- cron: "59 23 * * *"
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- id: fetch-latest-release
uses: thebritican/fetch-latest-release@v2.0.0
with:
github_token: ${{ github.token }}
repo_path: actions/runner
- id: commit
run: |
TAG=${{ steps.fetch-latest-release.outputs.tag_name }}
sed -i.bak "s/ARG RUNNER_VERSION.*/ARG RUNNER_VERSION=\"${TAG:1}\"/" Dockerfile
if [[ `git status -uno --porcelain` ]]; then
git config --global user.name 'lightningspirit [Automated 🤖]'
git config --global user.email 'lightningspirit@users.noreply.github.com'
git commit -am "Bump to $TAG"
git push
fi