From 66c5f5c3507e260416f3d4799cf227be235d0da0 Mon Sep 17 00:00:00 2001 From: John Boyes Date: Mon, 17 Aug 2020 19:23:38 +0700 Subject: [PATCH] Create issue every July to update Ubuntu version (#111) --- .github/DEPENDENCIES.md | 5 ++++ ...update-ubuntu-version-in-github-actions.md | 19 ++++++++++++++ .../schedule_ubuntu_annual_update_issue.yml | 26 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/scheduled/update-ubuntu-version-in-github-actions.md create mode 100644 .github/workflows/schedule_ubuntu_annual_update_issue.yml diff --git a/.github/DEPENDENCIES.md b/.github/DEPENDENCIES.md index 13cdc4c0..726fa9f9 100644 --- a/.github/DEPENDENCIES.md +++ b/.github/DEPENDENCIES.md @@ -28,3 +28,8 @@ which updates the version in the requisite files and then adds the change in a n but that would be overkill for now. Eventually as Dependabot adds more features we may be able to remove this workaround. + + +## Ubuntu version + +[Ubuntu releases annually in April](https://wiki.ubuntu.com/Releases). In 2020 the GitHub Actions team [supported the new version by mid June](https://github.com/actions/virtual-environments/issues/228#issuecomment-644065532), so we have [an issue automatically created on for 15th July each year](https://github.com/agilepathway/label-checker/pull/111) to prompt us to update. diff --git a/.github/ISSUE_TEMPLATE/scheduled/update-ubuntu-version-in-github-actions.md b/.github/ISSUE_TEMPLATE/scheduled/update-ubuntu-version-in-github-actions.md new file mode 100644 index 00000000..1c2fb6f1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/scheduled/update-ubuntu-version-in-github-actions.md @@ -0,0 +1,19 @@ +--- +name: Update Ubuntu version in GitHub Actions +about: Stay up to date with Ubuntu +title: Update Ubuntu version in GitHub Actions +labels: '' +assignees: '' + +--- + +[Ubuntu releases annually in April](https://wiki.ubuntu.com/Releases). + +In 2020 the GitHub Actions team [supported the April release for that year by mid June](https://github.com/actions/virtual-environments/issues/228#issuecomment-644065532), so this GitHub Issue gets automatically created annually each year on 15 July for us to do the update (as hopefully GitHub Actions will support the new version by then each year). + +We can find out if we can update yet [here](https://docs.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources). + +When we do the update to the new version it involves e.g. for 2021, simply replacing every case of `ubuntu-20.04` with `ubuntu-21.04`. + +- [ ] when we have updated and merged the change to the main branch, [this search](https://github.com/agilepathway/label-checker/search?q=20.04&unscoped_q=20.04) should return zero results (NB it may take 5 minutes before the search index will show the right results) +- [ ] update this issue template so that it corresponds to the following year (e.g. in July 2021, replace all cases of `20.04` with `21.04`) diff --git a/.github/workflows/schedule_ubuntu_annual_update_issue.yml b/.github/workflows/schedule_ubuntu_annual_update_issue.yml new file mode 100644 index 00000000..aaf85923 --- /dev/null +++ b/.github/workflows/schedule_ubuntu_annual_update_issue.yml @@ -0,0 +1,26 @@ +--- +name: Create issue annually to update Ubuntu +on: # yamllint disable-line rule:truthy + # Scheduled for 2am on 15th July every year + schedule: + - cron: '0 2 15 7 *' # * is a special character in YAML so we have to quote this string + +jobs: + create_issue: + name: Create issue to update Ubuntu + runs-on: ubuntu-20.04 + steps: + + # Repo code checkout required if `template` is used + - name: Checkout + uses: actions/checkout@v2.3.2 + + - name: issue-bot + uses: imjohnbo/issue-bot@v2.3 + with: + assignees: "johnboyes" + labels: "dependencies" + # assignees & labels in the template are overridden by the values specified in this action + template: ".github/ISSUE_TEMPLATE/scheduled/update-ubuntu-version-in-github-actions.md" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}