Skip to content

Commit

Permalink
fix: add registry login (#476)
Browse files Browse the repository at this point in the history
## This PR

Fixes container signing release step [1]. This step was missing the
registry login step, hence signature push failed.


[1] -
https://github.com/open-feature/flagd/actions/runs/4357163255/jobs/7616231967

---------

Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
  • Loading branch information
Kavindu-Dodan and beeme1mr authored Mar 9, 2023
1 parent f9adc8e commit 99de755
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,19 @@ jobs:
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
steps:
- name: Log in to the Container registry
uses: docker/login-action@ec9cdf07d570632daeb912f5b2099cb9ec1d01e6
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install Cosign
uses: sigstore/cosign-installer@bd2d1189b064bcddc3903176a807dcdba72d7fd0

- name: Sign the image
run: |
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.container-release.outputs.image_digest }}
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.container-release.outputs.digest }}
cosign public-key --key env://COSIGN_PRIVATE_KEY --outfile ${{ env.PUBLIC_KEY_FILE }}
env:
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
Expand Down

0 comments on commit 99de755

Please sign in to comment.