Skip to content

chore(deps): update actions/attest-build-provenance action to v4 #258

chore(deps): update actions/attest-build-provenance action to v4

chore(deps): update actions/attest-build-provenance action to v4 #258

Workflow file for this run

name: build
on:
push:
workflow_dispatch:
env:
OWNER: ${{ github.repository_owner }}
FILE: nginx
IMAGE: ghcr.io/${{ github.repository_owner }}/nginx
BUILDKIT_PROGRESS: plain
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
attestations: write
contents: read
id-token: write
packages: write
env:
TAG: latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Init
run: ./bin/init.sh
shell: bash
- name: docker-config
uses: containerbase/internal-tools@47c5fbb8818143e740b3bed860012a9b19c740c4 # v4.1.15
with:
command: docker-config
- name: fetch docker file
run: curl --retry 3 -fsSL -o base.Dockerfile https://raw.githubusercontent.com/nginx/docker-nginx/HEAD/modules/Dockerfile.alpine
- name: Build the Docker image
run: docker buildx bake test
- name: Test run
run: docker compose --file docker-compose.test.yml run sut
env:
IMAGE: ${{ env.IMAGE }}:${{ env.TAG }}
- name: Log into registry
if: github.ref_name == 'main'
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Publish the Docker image
if: github.ref_name == 'main'
run: |
docker buildx bake --metadata-file /tmp/meta.json build
jq . /tmp/meta.json
digest=$(jq -r '.push_ghcr.["containerimage.digest"]' /tmp/meta.json)
echo "digest=$digest" >> "$GITHUB_ENV"
- name: Attest the Docker image
uses: actions/attest-build-provenance@e4d4f7c39adfa4c260fb5c147f0622000aa14b99 # v4.0.0
if: github.ref_name == 'main'
with:
subject-name: ${{ env.IMAGE }}
subject-digest: ${{ env.digest }}
push-to-registry: true
release:
needs: build
permissions:
contents: write
runs-on: ubuntu-latest
if: github.ref_name == 'main'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Init
run: ./bin/init.sh
- uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
with:
allowUpdates: true
body: See https://github.com/nginx/nginx/releases/tag/release-${{ env.VERSION }} for more changes
commit: ${{ github.sha }}
name: ${{ env.VERSION }}
tag: v${{ env.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}