-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
feat(ci): Verify remaining toolboxes #779
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 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 |
---|---|---|
|
@@ -3,7 +3,7 @@ on: | |
schedule: | ||
- cron: '20 22 * * *' # 10:20pm everyday | ||
pull_request: | ||
merge_group: | ||
merge_group: | ||
workflow_dispatch: | ||
env: | ||
IMAGE_NAME: fedora-toolbox | ||
|
@@ -24,11 +24,16 @@ jobs: | |
id-token: write | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
steps: | ||
# Checkout push-to-registry action GitHub repository | ||
- name: Checkout Push to Registry action | ||
uses: actions/checkout@v4 | ||
|
||
|
||
- name: Verify Fedora distrobox | ||
uses: EyeCantCU/cosign-action/[email protected] | ||
with: | ||
containers: fedora-distrobox:latest | ||
|
||
# Build metadata | ||
- name: Image Metadata | ||
uses: docker/metadata-action@v5 | ||
|
@@ -50,7 +55,7 @@ jobs: | |
tags: ${{ env.IMAGE_TAGS }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
oci: false | ||
|
||
# Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. | ||
# https://github.com/macbre/push-to-ghcr/issues/12 | ||
- name: Lowercase Registry | ||
|
@@ -75,15 +80,15 @@ jobs: | |
password: ${{ env.REGISTRY_PASSWORD }} | ||
extra-args: | | ||
--disable-content-trust | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
if: github.event_name != 'pull_request' | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Sign container | ||
- uses: sigstore/[email protected] | ||
if: github.event_name != 'pull_request' | ||
|
This file contains 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 |
---|---|---|
|
@@ -3,7 +3,7 @@ on: | |
schedule: | ||
- cron: '20 22 * * *' # 10:20pm everyday | ||
pull_request: | ||
merge_group: | ||
merge_group: | ||
workflow_dispatch: | ||
env: | ||
IMAGE_NAME: ubuntu-toolbox | ||
|
@@ -24,11 +24,18 @@ jobs: | |
id-token: write | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
steps: | ||
# Checkout push-to-registry action GitHub repository | ||
- name: Checkout Push to Registry action | ||
uses: actions/checkout@v4 | ||
|
||
|
||
- name: Verify Ubuntu toolbox | ||
uses: EyeCantCU/cosign-action/[email protected] | ||
with: | ||
containers: ubuntu-toolbox:22.04 | ||
pubkey: https://raw.githubusercontent.com/toolbx-images/images/main/quay.io-toolbx-images.pub | ||
registry: quay.io/toolbx-images | ||
|
||
# Build metadata | ||
- name: Image Metadata | ||
uses: docker/metadata-action@v5 | ||
|
@@ -50,7 +57,7 @@ jobs: | |
tags: ${{ env.IMAGE_TAGS }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
oci: false | ||
|
||
# Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. | ||
# https://github.com/macbre/push-to-ghcr/issues/12 | ||
- name: Lowercase Registry | ||
|
@@ -75,15 +82,15 @@ jobs: | |
password: ${{ env.REGISTRY_PASSWORD }} | ||
extra-args: | | ||
--disable-content-trust | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
if: github.event_name != 'pull_request' | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Sign container | ||
- uses: sigstore/[email protected] | ||
if: github.event_name != 'pull_request' | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we have this here still? I don't believe it's required and provides even more security for in-transit communication
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I had to guess, this is because it would require us to trust the container locally before pushing it to the registry. In Red Hat's own workflows, for
push-to-registry
, they disable content trust:https://github.com/search?q=repo%3Aredhat-actions%2Fpush-to-registry%20--disable-content-trust&type=code
However, I do believe this is something that would be worth looking into. At the very least, we may be able to emulate this behavior by signing the container locally with cosign before a push, and then verifying it after
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to remove the flag if nobody remembers why it's there.
It works without it in my older workflow that use these actions. Have made a PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great!