Skip to content

Build and push Docker image #1

Build and push Docker image

Build and push Docker image #1

Workflow file for this run

name: Build and push Docker image
on:
workflow_dispatch:
jobs:
build:
name: Build Docker image
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
attestations: write
packages: write
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build . -t ${{ secrets.DOCKER_IMAGE }}
- name: Push Docker image
run: docker push ${{ secrets.DOCKER_IMAGE }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ secrets.DOCKER_IMAGE }}
subject-digest: ${{ secrets.DOCKER_IMAGE_DIGEST }}
push-to-registry: true