Repository navigation
Pin the Docker Lint Images by Digest Through a Dependabot-Tracked Manifest #4461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3775b94
Pin the Docker Lint Images by Digest Through a Dependabot-Tracked Man…
ptr727 569033b
Answer the First Local Review Pass on the Docker Lint Pins
ptr727 f9b9091
Say the Fetched docker_lint.py Arrives With Its Pin Manifest in the R…
ptr727 1449560
Answer the Second Local Review Pass on the Docker Lint Pins
ptr727 81887b5
Hold Every Docker Step's Pull Retry to the Tested Copy
ptr727 7f6fb9e
Read the Docker Steps Live and Stub timeout in the Pull Retry Tests
ptr727 c0c9e4c
Count Every docker run in the Workflow Against the Steps the Pull Ret…
ptr727 7df392c
Count Every docker run and Hold Each Lint Image Variable to a Docker …
ptr727 d27d984
Read Both Sides of the docker run Count Without Comment Lines
ptr727 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # The Docker lint images, read by action.yml beside this file, by repo_gate.py, and by scripts/docker_lint.py. | ||
| # It is never built, and is a Dockerfile only so Dependabot's docker ecosystem bumps each tag and its digest. | ||
| FROM ghcr.io/editorconfig-checker/editorconfig-checker:4.0.2@sha256:2ba6232bfa0058f72f5f7d7816711590aa764afab1542af30b3ecb4553587918 AS editorconfig-checker | ||
| FROM rhysd/actionlint:1.7.12@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667 AS actionlint | ||
| FROM davidanson/markdownlint-cli2:v0.24.2@sha256:c768e94d8bb161c449bde28f60656929ca1f02c3010a405f65c9cac71563a889 AS markdownlint | ||
| FROM ghcr.io/streetsidesoftware/cspell:10.5.2@sha256:d16ebc7f7b81414c500f279b0f96c43a8c1bfa04279b9b8d98d13c300e2b7095 AS cspell | ||
| FROM mirror.gcr.io/koalaman/shellcheck:v0.11.0@sha256:61862eba1fcf09a484ebcc6feea46f1782532571a34ed51fedf90dd25f925a8d AS shellcheck | ||
| FROM mirror.gcr.io/mvdan/shfmt:v3.14.1@sha256:8c06884a35683d8763fba6c0d9484d11a61a96da65f8d497d6f625825a6043f2 AS shfmt | ||
| FROM mcr.microsoft.com/powershell:7.4-ubuntu-22.04@sha256:62300a213a9293916333df2b014cd3a8f22fb0b0b65f2bb446aaf436bcf8c868 AS powershell |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Docker lint pins | ||
| description: Read the Docker lint image references, each a version tag with its digest, from the Dockerfile beside this action. | ||
|
|
||
| outputs: | ||
| editorconfig-checker: | ||
| description: The editorconfig-checker image reference the Dockerfile pins. | ||
| value: ${{ steps.read.outputs.editorconfig-checker }} | ||
| shellcheck: | ||
| description: The shellcheck image reference the Dockerfile pins. | ||
| value: ${{ steps.read.outputs.shellcheck }} | ||
| shfmt: | ||
| description: The shfmt image reference the Dockerfile pins. | ||
| value: ${{ steps.read.outputs.shfmt }} | ||
| powershell: | ||
| description: The PowerShell image reference the Dockerfile pins. | ||
| value: ${{ steps.read.outputs.powershell }} | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| # The manifest is read from the action's own path, so a caller reaching this action at a hub pin runs that pin's images. | ||
| - name: Read Docker lint pins step | ||
| id: read | ||
| shell: bash | ||
| run: | | ||
| set -Eeuo pipefail | ||
| manifest="$GITHUB_ACTION_PATH/Dockerfile" | ||
| for stage in editorconfig-checker actionlint markdownlint cspell shellcheck shfmt powershell; do | ||
| ref=$(sed -n "s/^FROM \([^[:space:]@]*:[^[:space:]@/]*@sha256:[0-9a-f]\{64\}\) AS ${stage}[[:space:]]*\$/\1/p" "$manifest") | ||
| if [ -z "$ref" ] || [ "$ref" != "${ref%%$'\n'*}" ]; then | ||
| echo "::error::$manifest must pin $stage on exactly one 'FROM <image>:<tag>@sha256:<digest> AS $stage' line." | ||
| exit 1 | ||
| fi | ||
| echo "$stage=$ref" >> "$GITHUB_OUTPUT" | ||
| done |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.