Skip to content

Commit

Permalink
Refresh GHAWs: expand linting, switch to GHCR
Browse files Browse the repository at this point in the history
EXPAND LINTING TO USE UNSTABLE & OLDSTABLE CONTAINERS

Use the same matrix of containers for linting in the `Validate
Codebase` GHAW that we're already using for testing and building jobs.

This applies the minimum linting requirements in addition to testing
"unstable" linting options that may become the new baseline in the
future.

One notable difference is that out of the matrix of containers used
for linting we mark the unstable container as "experimental" and
configure the job to ignore linting errors generated by that
container. This effectively makes any linting output from the unstable
container informational only as intended.

SWITCH DOCKER IMAGE SOURCE

Switch out images from Docker Hub to Git Hub Container Registry
(GHCR).

REFERENCES

- GH-68
- GH-69
  • Loading branch information
atc0005 committed Feb 7, 2022
1 parent 9bc6923 commit 04ba2d8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/lint-and-build-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,21 @@ jobs:
name: Lint codebase
runs-on: ubuntu-latest
timeout-minutes: 10
# Don't flag the whole workflow as failed if "experimental" matrix jobs
# fail. This allows the unstable image linting tasks to fail without
# marking the oldstable and stable image linting jobs as failed.
continue-on-error: ${{ matrix.experimental }}
strategy:
# Don't stop all workflow jobs if the unstable image linting tasks fail.
fail-fast: false
matrix:
container-image: ["go-ci-oldstable", "go-ci-stable"]
experimental: [false]
include:
- container-image: "go-ci-unstable"
experimental: true
container:
image: index.docker.io/atc0005/go-ci:go-ci-lint-only
image: "ghcr.io/atc0005/go-ci:${{ matrix.container-image}}"

steps:
- name: Check out code
Expand Down Expand Up @@ -52,7 +65,7 @@ jobs:
container-image: ["go-ci-oldstable", "go-ci-stable", "go-ci-unstable"]

container:
image: "index.docker.io/atc0005/go-ci:${{ matrix.container-image}}"
image: "ghcr.io/atc0005/go-ci:${{ matrix.container-image}}"

steps:
- name: Check out code
Expand All @@ -71,7 +84,7 @@ jobs:
container-image: ["go-ci-oldstable", "go-ci-stable", "go-ci-unstable"]

container:
image: "index.docker.io/atc0005/go-ci:${{ matrix.container-image}}"
image: "ghcr.io/atc0005/go-ci:${{ matrix.container-image}}"

steps:
- name: Print go version
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/lint-and-build-using-make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
# Default: 360 minutes
timeout-minutes: 10
container:
image: "index.docker.io/golang:latest"
# Use (lightly touched) mirror of current "vanilla" upstream golang image
image: "ghcr.io/atc0005/go-ci:go-ci-stable-mirror-build"

steps:
- name: Print go version
Expand Down Expand Up @@ -58,7 +59,8 @@ jobs:
# Default: 360 minutes
timeout-minutes: 10
container:
image: "index.docker.io/golang:latest"
# Use (lightly touched) mirror of current "vanilla" upstream golang image
image: "ghcr.io/atc0005/go-ci:go-ci-stable-mirror-build"

steps:
- name: Print go version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-and-test-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
container:
image: index.docker.io/atc0005/go-ci:go-ci-lint-only
image: ghcr.io/atc0005/go-ci:go-ci-lint-only

steps:
- name: Check out code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-docker-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
container:
image: index.docker.io/hadolint/hadolint:latest-debian
image: ghcr.io/hadolint/hadolint:latest-debian

steps:
- name: Check out code
Expand Down

0 comments on commit 04ba2d8

Please sign in to comment.