mirror of
https://github.com/irongut/CodeCoverageSummary.git
synced 2026-05-18 07:50:13 +02:00
merge PR #52 Sign Docker image on release
PR: Sign Docker image on release
This commit is contained in:
@@ -7,13 +7,8 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
types: [opened]
|
types: [opened]
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
assignAuthor:
|
assignAuthor:
|
||||||
permissions:
|
|
||||||
issues: write # for samspills/assign-pr-to-author
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
id-token: write # Used for identity challenge with sigstore/fulcio
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
@@ -58,6 +60,14 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@d171c3b028d844f2bf14e9fdec0c58114451e4bf
|
uses: actions/checkout@d171c3b028d844f2bf14e9fdec0c58114451e4bf
|
||||||
|
|
||||||
|
- name: Install Cosign
|
||||||
|
uses: sigstore/cosign-installer@c68f43abf1ae5df2528c9c250088fa14ed2d0ef5
|
||||||
|
with:
|
||||||
|
cosign-release: 'v1.9.0'
|
||||||
|
|
||||||
|
- name: Setup Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7
|
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7
|
||||||
with:
|
with:
|
||||||
@@ -72,9 +82,18 @@ jobs:
|
|||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
- name: Build + Push Docker image
|
- name: Build + Push Docker image
|
||||||
|
id: build-and-push
|
||||||
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
|
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
# Sign the Docker image digest
|
||||||
|
# Uses the identity token to provision an ephemeral certificate against the community Fulcio instance
|
||||||
|
# https://github.com/sigstore/cosign
|
||||||
|
- name: Sign the Docker image
|
||||||
|
env:
|
||||||
|
COSIGN_EXPERIMENTAL: "true"
|
||||||
|
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}
|
||||||
|
|||||||
Reference in New Issue
Block a user