Skip to content

Commit

Permalink
ci: version 2
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-cardenas-coding committed Dec 16, 2023
1 parent 2877133 commit f512acd
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/nightly-docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:

- name: Build and push
uses: docker/build-push-action@v2
id: build-and-push
with:
context: .
file: ./Dockerfile-offline
Expand All @@ -73,14 +74,28 @@ jobs:
- name: Get signing key
run: echo "${{ secrets.SIGNING_SECRET }}" > cosign.key

- name: Container Signing
# - name: Container Signing
# run: |
# cosign sign --key cosign.key \
# -a "repo=${{ github.repository }}" \
# -a "workflow=${{ github.workflow }}" \
# -a "ref=${{ github.sha }}" \
# -a "owner=Spectro Cloud" \
# ${{ steps.meta.outputs.tags }}
# env:
# COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}

- name: Sign image with a key
run: |
cosign sign --key cosign.key \
-a "repo=${{ github.repository }}" \
-a "workflow=${{ github.workflow }}" \
-a "ref=${{ github.sha }}" \
-a "owner=Spectro Cloud" \
${{ steps.meta.outputs.tags }}
cosign sign --yes \
-a "repo=${{ github.repository }}" \
-a "workflow=${{ github.workflow }}" \
-a "ref=${{ github.sha }}" \
-a "owner=Spectro Cloud" \
--key env://COSIGN_PRIVATE_KEY "${TAGS}@${DIGEST}" \
env:
TAGS: ${{ steps.docker_meta.outputs.tags }}
COSIGN_PRIVATE_KEY: ${{ secrets.SIGNING_SECRET }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}

0 comments on commit f512acd

Please sign in to comment.