Skip to content
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

Updating build action to include provenance #182

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

johnsimons
Copy link
Member

@johnsimons johnsimons commented Feb 10, 2025

This is to fix
image

Replaced multiple tagging commands with a single one
@johnsimons johnsimons self-assigned this Feb 10, 2025
Invoke-Expression $cmd
Write-Output "::endgroup::"
}
$tagsCLI = $tags -replace "^", "--tag particular/servicecontrol-masstransit-connector:"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced multiple commands with a single command

run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
uses: docker/login-action@v3
with:
registry: ghcr.io
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the Github action to authenticate to Github registry

docker buildx imagetools inspect ghcr.io/particular/servicecontrol-masstransit-connector:${{ env.TAG_NAME }}
uses: docker/login-action@v3
with:
registry: ghcr.io
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the Github action to authenticate to Github registry

id: date
run: echo "::set-output name=date::$(date +'+%FT%TZ')"
- name: Build and push image to GitHub container registry
uses: docker/build-push-action@v6
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Github action to push and tag image.
This will use provenance

@johnsimons johnsimons force-pushed the john/native branch 3 times, most recently from 74b4a22 to 0b38e43 Compare February 10, 2025 02:04
Using build-push-action instead of script
This adds the provenance by default, see https://docs.docker.com/build/ci/github-actions/attestations/#default-provenance
This given the image a better score in dockerhub scout health score
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant