|
7 | 7 | env: |
8 | 8 | REGISTRY: ghcr.io |
9 | 9 | IMAGE_NAME: ${{ github.repository }} |
10 | | - VERSION: ${{ github.ref_name }} |
11 | 10 |
|
12 | 11 | jobs: |
13 | 12 | build: |
14 | 13 | runs-on: ubuntu-latest |
15 | 14 | permissions: |
16 | | - contents: read |
| 15 | + contents: write |
17 | 16 | packages: write |
18 | | - id-token: write |
19 | 17 |
|
20 | 18 | steps: |
21 | 19 | - name: Checkout repository |
22 | | - uses: actions/checkout@v5.0.1 |
| 20 | + uses: actions/checkout@v6.0.2 |
23 | 21 |
|
24 | | - - name: Install cosign |
25 | | - if: github.event_name != 'pull_request' |
26 | | - uses: sigstore/cosign-installer@v4.0.0 |
| 22 | + - name: Set up QEMU |
| 23 | + uses: docker/setup-qemu-action@v3.7.0 |
27 | 24 |
|
28 | 25 | - name: Set up Docker Buildx |
29 | | - uses: docker/setup-buildx-action@v3.11.1 |
| 26 | + uses: docker/setup-buildx-action@v3.12.0 |
30 | 27 |
|
31 | 28 | - name: Log into registry ${{ env.REGISTRY }} |
32 | | - if: github.event_name != 'pull_request' |
33 | | - uses: docker/login-action@v3.6.0 |
| 29 | + uses: docker/login-action@v3.7.0 |
34 | 30 | with: |
35 | 31 | registry: ${{ env.REGISTRY }} |
36 | 32 | username: ${{ github.actor }} |
37 | 33 | password: ${{ secrets.GITHUB_TOKEN }} |
38 | 34 |
|
39 | 35 | - name: Extract Docker metadata |
40 | 36 | id: meta |
41 | | - uses: docker/metadata-action@v5.9.0 |
| 37 | + uses: docker/metadata-action@v5.10.0 |
42 | 38 | with: |
43 | 39 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} |
44 | 40 |
|
45 | 41 | - name: Build and push Docker image |
46 | 42 | id: build-and-push |
47 | | - uses: docker/build-push-action@v6.18.0 |
| 43 | + uses: docker/build-push-action@v6.19.2 |
48 | 44 | with: |
49 | 45 | context: . |
50 | | - push: ${{ github.event_name != 'pull_request' }} |
| 46 | + push: true |
51 | 47 | tags: ${{ steps.meta.outputs.tags }} |
52 | 48 | labels: ${{ steps.meta.outputs.labels }} |
53 | 49 | cache-from: type=gha |
54 | 50 | cache-to: type=gha,mode=max |
55 | 51 | platforms: linux/amd64,linux/arm64 |
56 | | - build-args: VERSION=${{ env.VERSION }} |
| 52 | + build-args: VERSION=${{ github.ref_name }} |
57 | 53 | provenance: false |
58 | | - |
59 | | - - name: Sign the published Docker image |
60 | | - if: ${{ github.event_name != 'pull_request' }} |
61 | | - env: |
62 | | - TAGS: ${{ steps.meta.outputs.tags }} |
63 | | - DIGEST: ${{ steps.build-and-push.outputs.digest }} |
64 | | - run: echo ${{ steps.meta.outputs.tags }} | tr ',' '\n' | xargs -I {} cosign sign --yes {}@${DIGEST} |
| 54 | + sbom: false |
0 commit comments