Skip to content

Commit

Permalink
ci: attempt to fix DCT key
Browse files Browse the repository at this point in the history
  • Loading branch information
buchdag committed May 17, 2024
1 parent 5f77e53 commit 38c49ef
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build-publish-signed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ jobs:
env:
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DCT_KEY_PASSPHRASE }}
DCT_KEY_BASE64: ${{ secrets.DCT_KEY_BASE64 }}
DCT_KEY_ID: ${{ secrets.DCT_KEY_ID }}
run: |
echo "$DCT_KEY_BASE64" | base64 -d > delegation.key
chmod 600 delegation.key
docker trust key load delegation.key --name gha
mkdir -p ~/.docker/trust/private
echo "$DCT_KEY_BASE64" | base64 -d > "~/.docker/trust/private/${DCT_KEY_ID}.key"
chmod 600 "~/.docker/trust/private/${DCT_KEY_ID}.key"
docker trust key load "~/.docker/trust/private/${DCT_KEY_ID}.key" --name gha
- name: Login to DockerHub
uses: docker/login-action@v3
Expand All @@ -50,4 +52,6 @@ jobs:
docker trust inspect --pretty ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
- name: Remove DCT delegation key
run: rm delegation.key
env:
DCT_KEY_ID: ${{ secrets.DCT_KEY_ID }}
run: rm "~/.docker/trust/private/${DCT_KEY_ID}.key"

0 comments on commit 38c49ef

Please sign in to comment.