Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[workflow] Add workflow to automatically bump the s390x runner version #11

Merged
merged 1 commit into from
Jan 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/version_bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: s390x version bump

# This workflow pulls the latest official actions runner version using GH API
# and update our s390x Dockerfile.
# If a change happens, the change will be commited in a versioned branch and
# a PR will be created. Upon merging, the branch will be deleted.
#
# The workflow can be triggered manually (workflow_dispatch) but also runs nightly
# before the nightly rebuild.
on:
schedule:
- cron: '00 17 * * *'
workflow_dispatch:

jobs:
bump_version:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Get latest runner release
id: release
run: |
ACTIONS_VERSION=$(curl -L https://api.github.com/repos/actions/runner/releases/latest | jq -r '.name[1:]')
if [ "${ACTIONS_VERSION}" == "null" ]
then
echo "::error Invalid ACTIONS_VERSION ${ACTIONS_VERSION}"
exit 1
fi
echo "ACTIONS_VERSION=${ACTIONS_VERSION}" >> $GITHUB_OUTPUT

- name: Update release
id: bump
run: sed -i 's#^ARG version=.*#ARG version=${{ steps.release.outputs.ACTIONS_VERSION}}#' s390x.Dockerfile

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
title: "[automated] Bumping s390x containers to action-runners v${{ steps.release.outputs.ACTIONS_VERSION}}"
commit-message: "[automated] Bumping s390x containers to action-runners v${{ steps.release.outputs.ACTIONS_VERSION}}"
branch: "version-bump/${{ steps.release.outputs.ACTIONS_VERSION}}"
delete-branch: true
body: ""
team-reviewers: kernel-patches/meta-ci-reviewers