Skip to content

Commit 18cba89

Browse files
committed
Keep the IRC Ubuntu version in sync with the main job's version
In the process, update the IRC Ubuntu version to 20.04. Fixes #608.
1 parent 81128bd commit 18cba89

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

fixtures/irc-channels.github

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
jobs:
2020
irc:
2121
name: Haskell-CI (IRC notification)
22-
runs-on: ubuntu-18.04
22+
runs-on: ubuntu-20.04
2323
needs:
2424
- linux
2525
if: ${{ always() }}

haskell-ci.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 2.2
22
name: haskell-ci
3-
version: 0.15.20220808
3+
version: 0.15.20220812
44
synopsis: Cabal package script generator for Travis-CI
55
description:
66
Script generator (@haskell-ci@) for

src/HaskellCI/GitHub.hs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ makeGitHub _argv config@Config {..} gitconfig prj jobs@JobVersions {..} = do
609609
{ ghjName = actionName ++ " - Linux - ${{ matrix.compiler }}"
610610
-- NB: The Ubuntu version used in `runs-on` isn't
611611
-- particularly important since we use a Docker container.
612-
, ghjRunsOn = "ubuntu-20.04"
612+
, ghjRunsOn = ghcRunsOnVer
613613
, ghjNeeds = []
614614
, ghjSteps = steps
615615
, ghjIf = Nothing
@@ -765,7 +765,7 @@ postgresService = GitHubService
765765
ircJob :: String -> String -> String -> Config -> GitConfig -> ListBuilder (String, GitHubJob) ()
766766
ircJob actionName mainJobName projectName cfg gitconfig = item ("irc", GitHubJob
767767
{ ghjName = actionName ++ " (IRC notification)"
768-
, ghjRunsOn = "ubuntu-18.04"
768+
, ghjRunsOn = ghcRunsOnVer
769769
, ghjNeeds = [mainJobName]
770770
, ghjIf = jobCondition
771771
, ghjContainer = Nothing
@@ -872,3 +872,10 @@ parseGitHubRepo t =
872872
repo <- Atto.takeWhile (/= '.')
873873
_ <- optional (Atto.string ".git")
874874
return repo
875+
876+
-- NB: The Ubuntu version used in `runs-on` isn't particularly important since
877+
-- we use a Docker container. We do make an attempt to keep it relatively up to
878+
-- date to ensure that it runs on a version of Ubuntu that GitHub Actions
879+
-- runners support.
880+
ghcRunsOnVer :: String
881+
ghcRunsOnVer = "ubuntu-20.04"

0 commit comments

Comments
 (0)