mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-05-29 22:05:12 +02:00
.github: clarify docker build steps
This commit is contained in:
parent
59aad26e29
commit
0e35e587f2
1 changed files with 5 additions and 3 deletions
8
.github/workflows/docker.yml
vendored
8
.github/workflows/docker.yml
vendored
|
|
@ -5,6 +5,8 @@ on:
|
||||||
branches: [ 'main' ]
|
branches: [ 'main' ]
|
||||||
tags: [ 'v*' ]
|
tags: [ 'v*' ]
|
||||||
pull_request:
|
pull_request:
|
||||||
|
# Run the workflow on pull_request events to ensure we can still build the image.
|
||||||
|
# We only publish the image on push events (see if statements in steps below).
|
||||||
branches: [ 'main' ]
|
branches: [ 'main' ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|
@ -27,7 +29,7 @@ jobs:
|
||||||
|
|
||||||
- name: Log into registry ${{ env.REGISTRY }}
|
- name: Log into registry ${{ env.REGISTRY }}
|
||||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name == 'push'
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
|
|
@ -50,10 +52,10 @@ jobs:
|
||||||
|
|
||||||
# Sign the Docker image
|
# Sign the Docker image
|
||||||
- name: Install cosign
|
- name: Install cosign
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name == 'push'
|
||||||
uses: sigstore/cosign-installer@9becc617647dfa20ae7b1151972e9b3a2c338a2b #v2.8.1
|
uses: sigstore/cosign-installer@9becc617647dfa20ae7b1151972e9b3a2c338a2b #v2.8.1
|
||||||
- name: Sign the published Docker image
|
- name: Sign the published Docker image
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name == 'push'
|
||||||
env:
|
env:
|
||||||
COSIGN_EXPERIMENTAL: "true"
|
COSIGN_EXPERIMENTAL: "true"
|
||||||
run: cosign sign ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}
|
run: cosign sign ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue