Skip to content

Commit

Permalink
Use ubuntu-latest in GitHub Actions (#73)
Browse files Browse the repository at this point in the history
Prior to this commit we had harcoded the Ubuntu version in our GitHub
Actions to 20.04, with a GitHub Issue being automatically generated
every year to update to the latest version.

GitHub Actions only updates every 2 years, it turns out, not ever year,
as they only upgrade to LTS versions.  GitHub Actions don't support a
Cron scheduler in the format that's needed for every 2 years, so have
decided to be pragmatic and just use ubuntu-latest.
  • Loading branch information
johnboyes committed Nov 23, 2021
1 parent 41cc90a commit 1428636
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 49 deletions.
5 changes: 0 additions & 5 deletions .github/DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,3 @@ We have [pinned the linux dependencies in the devcontainer Dockerfile](https://g
2. Execute the Dockerfile (e.g. if it's a remote container Dockerfile build the remote container)
3. Run `apt-cache policy <package>` for each package, to see the version installed
4. Pin all the versions, replacing any old versions with new ones


## 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/hoverfly-github-action/pull/55) to prompt us to update.
2 changes: 1 addition & 1 deletion .github/workflows/check-commit-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
check-commit-message-style:
if: (github.actor!= 'dependabot[bot]') && (contains(github.head_ref, 'dependabot/github_actions/') == false)
name: Check commit message style
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Check
uses: mristin/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_semver_labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

check_semver_label:
name: Check for semantic version label
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: docker://agilepathway/pull-request-label-checker:v1.0.9
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot_hack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

dependabot_hack:
name: Ensure dependabot version checks
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:

# update the version manually in these places, too:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/github_tag_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

tag:
name: Tag semantic version
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Tag
uses: K-Phoen/[email protected]
Expand All @@ -23,7 +23,7 @@ jobs:
release:
needs: tag
name: Create GitHub Release
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
-
name: Checkout
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:

hadolint:
name: runner / hadolint
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/[email protected]
Expand All @@ -19,7 +19,7 @@ jobs:

yamllint:
name: runner / yamllint
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: yamllint
Expand All @@ -30,7 +30,7 @@ jobs:

shellcheck:
name: runner / shellcheck
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: shellcheck
Expand All @@ -44,7 +44,7 @@ jobs:

misspell:
name: runner / misspell
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: reviewdog/[email protected]
Expand All @@ -54,7 +54,7 @@ jobs:

languagetool:
name: runner / languagetool
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: reviewdog/[email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on: # yamllint disable-line rule:truthy
jobs:
create_issue:
name: Create issue to update Dockerfile dependencies
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:

# Repo code checkout required if `template` is used
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/schedule_ubuntu_annual_update_issue.yml

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

install_latest_version_by_default:
name: Install latest version by default
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install Hoverfly
Expand All @@ -34,7 +34,7 @@ jobs:
install_specific_version:
name: Install specific version
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
HOVERFLY_VERSION: v1.2.0
steps:
Expand All @@ -52,7 +52,7 @@ jobs:
install_fails_if_version_does_not_begin_with_v:
name: Install fails if version does not begin with v
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
HOVERFLY_VERSION: "1.2.0"
steps:
Expand All @@ -70,7 +70,7 @@ jobs:
install_fails_if_no_runner_github_workspace_path:
name: Install fails when no runner GitHub workspace path provided
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install Hoverfly
Expand All @@ -83,7 +83,7 @@ jobs:
install_fails_if_incorrect_runner_github_workspace_path:
name: Install fails when incorrect runner GitHub workspace path provided
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install Hoverfly
Expand All @@ -98,7 +98,7 @@ jobs:
use_script_to_enable_https_simulations:
name: Enable https simulations
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install Hoverfly
Expand All @@ -119,7 +119,7 @@ jobs:
https_simulations_do_not_work_without_https_script:
name: Verify https simulations will not work without script
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install Hoverfly
Expand Down

0 comments on commit 1428636

Please sign in to comment.