Update GitHub Actions runner images to ubuntu-22.04 #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update getting started guide | |
on: | |
release: | |
types: ['released'] | |
pull_request: | |
branches: ['main', 'release/**'] | |
paths: | |
# Run workflow on changes to the workflow definition itself to spot check | |
# the core version update functionality. | |
- '.github/workflows/update-getting-started-guide.yml' | |
- 'scripts/update-getting-started-guide-version.sh' | |
# Run workflow on changes to the getting started guide to validate | |
# changes to the documentation do not break the update workflow. | |
- 'docs/getting-started.md' | |
jobs: | |
test-update-version: | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
pull-requests: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
docs/getting-started.md | |
scripts/update-getting-started-guide-version.sh | |
- name: Test update getting started version | |
run: bash scripts/update-getting-started-guide-version.sh --assert v0.0.0-${{ github.event.pull_request.number }} | |
update-version: | |
if: github.event_name == 'release' | |
runs-on: ubuntu-22.04 | |
permissions: | |
# Write permissions needed to create pull request. | |
# Risk is mitigated by seperating jobs such that workflows | |
# running with write permissions only use code from main. | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
sparse-checkout: | | |
docs/getting-started.md | |
scripts/update-getting-started-guide-version.sh | |
- name: Update getting started version | |
run: bash scripts/update-getting-started-guide-version.sh --verbose ${{ github.event.release.tag_name }} | |
- name: Create PR | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
title: 'Update getting started to ${{ github.event.release.tag_name }}' | |
commit-message: 'Update getting started to ${{ github.event.release.tag_name }}' | |
body: | | |
This PR must be closed and reopened manually to trigger automated checks. | |
Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request). | |
labels: easy-to-review, automated-pr | |
token: ${{ secrets.GITHUB_TOKEN }} | |
author: "GitHub <[email protected]>" | |
signoff: true | |
branch: 'create-pull-request/update-getting-started-version-to-${{ github.event.release.tag_name }}' | |
base: main | |
delete-branch: true |