-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
31 deletions.
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 |
---|---|---|
|
@@ -38,35 +38,24 @@ jobs: | |
useConfigFile: true | ||
configFilePath: ci/git-version.yml | ||
|
||
- name: Build Multi-Arch Docker Image | ||
id: build-image | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: "usabilitydynamics" | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Push Signed Docker Images | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64 | ||
push: false # Do not push yet | ||
load: true # Ensure the built image is loaded into the local Docker environment | ||
push: true | ||
tags: | | ||
usabilitydynamics/udx-worker:${{ steps.gitversion.outputs.semVer }} | ||
usabilitydynamics/udx-worker:latest | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: "usabilitydynamics" | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Install Cosign | ||
uses: sigstore/[email protected] | ||
|
||
- name: Extract Image Digest | ||
id: extract-digest | ||
run: | | ||
# Extract the digest of the built image | ||
IMAGE_DIGEST=$(docker inspect usabilitydynamics/udx-worker:${{ steps.gitversion.outputs.semVer }} | grep -o 'sha256:[a-f0-9]\{64\}' | head -n 1) | ||
echo "IMAGE_DIGEST=$IMAGE_DIGEST" >> $GITHUB_ENV | ||
shell: bash | ||
uses: sigstore/[email protected] | ||
|
||
- name: Sign Docker Image with Cosign | ||
env: | ||
|
@@ -76,17 +65,7 @@ jobs: | |
# Correctly format the reference with @sha256 for Cosign | ||
cosign sign -y \ | ||
--key env://COSIGN_PRIVATE_KEY \ | ||
usabilitydynamics/udx-worker@${IMAGE_DIGEST} | ||
- name: Push Signed Docker Images | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
push: true | ||
tags: | | ||
usabilitydynamics/udx-worker:${{ steps.gitversion.outputs.semVer }} | ||
usabilitydynamics/udx-worker:latest | ||
usabilitydynamics/udx-worker | ||
- name: Install Trivy | ||
run: | | ||
|