1- name : publish on docker registery
1+ name : Build and publish to GHCR
22
3- # This workflow uses actions that are not certified by GitHub.
4- # They are provided by a third-party and are governed by
5- # separate terms of service, privacy policy, and support
6- # documentation.
73on :
84 push :
95 branches : [ "main" ]
10- # Publish semver tags as releases.
116 tags : [ 'v*.*.*' ]
12- # pull_request:
13- # branches: [ "main" ]
147
158env :
16- # Use docker.io for Docker Hub if empty
179 REGISTRY : ghcr.io
18- # github.repository as <account>/<repo>
19- IMAGE_NAME : ${{ github.repository }}
10+ IMAGE_NAME : parchlinux-frontend
2011
2112jobs :
2213 build :
@@ -28,67 +19,30 @@ jobs:
2819
2920 steps :
3021 - name : Checkout repository
31- uses : actions/checkout@v3
22+ uses : actions/checkout@v4
3223
33- # Install the cosign tool except on PR
34- # https://github.com/sigstore/cosign-installer
35- - name : Install cosign
36- if : github.event_name != 'pull_request'
37- uses : sigstore/cosign-installer@v4.0.0
38- with :
39- cosign-release : ' v3.0.2'
40- # - name: Install cosign
41- # if: github.event_name != 'pull_request'
42- # uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1
43- # with:
44- # cosign-release: 'v2.1.1'
45-
46- # Set up BuildKit Docker container builder to be able to build
47- # multi-platform images and export cache
48- # https://github.com/docker/setup-buildx-action
4924 - name : Set up Docker Buildx
50- uses : docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
25+ uses : docker/setup-buildx-action@v3
5126
52- # Login against a Docker registry except on PR
53- # https://github.com/docker/login-action
5427 - name : Log into registry ${{ env.REGISTRY }}
5528 if : github.event_name != 'pull_request'
56- uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
29+ uses : docker/login-action@v3
5730 with :
5831 registry : ${{ env.REGISTRY }}
5932 username : ${{ github.actor }}
6033 password : ${{ secrets.GITHUB_TOKEN }}
6134
62- # Extract metadata (tags, labels) for Docker
63- # https://github.com/docker/metadata-action
6435 - name : Extract Docker metadata
6536 id : meta
66- uses : docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
37+ uses : docker/metadata-action@v5
6738 with :
68- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
39+ images : ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
6940
70- # Build and push Docker image with Buildx (don't push on PR)
71- # https://github.com/docker/build-push-action
7241 - name : Build and push Docker image
7342 id : build-and-push
74- uses : docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
43+ uses : docker/build-push-action@v6
7544 with :
7645 context : .
77- push : ${{ github.event_name != 'pull_request' }}
46+ push : true
7847 tags : ${{ steps.meta.outputs.tags }}
7948 labels : ${{ steps.meta.outputs.labels }}
80-
81- # Sign the resulting Docker image digest except on PRs.
82- # This will only write to the public Rekor transparency log when the Docker
83- # repository is public to avoid leaking data. If you would like to publish
84- # transparency data even for private images, pass --force to cosign below.
85- # https://github.com/sigstore/cosign
86- # - name: Sign the published Docker image
87- # if: ${{ github.event_name != 'pull_request' }}
88- # env:
89- # # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
90- # TAGS: ${{ steps.meta.outputs.tags }}
91- # DIGEST: ${{ steps.build-and-push.outputs.digest }}
92- # # This step uses the identity token to provision an ephemeral certificate
93- # # against the sigstore community Fulcio instance.
94- # run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
0 commit comments