pagerduty-cachet

git clone git://archive.git.mtrnord.blog/MTRNord/pagerduty-cachet.git
Log | Files | Refs | README

docker.yml (1791B)


      1 name: docker
      2 
      3 on:
      4   workflow_dispatch:
      5   push:
      6     branches:
      7       - main
      8 
      9 env:
     10   REGISTRY: ghcr.io
     11   IMAGE_NAME: ${{ github.repository }}
     12 
     13 jobs:
     14   docker:
     15     runs-on: ubuntu-latest
     16     permissions:
     17       contents: read
     18       packages: write
     19       id-token: write
     20       attestations: write
     21     steps:
     22       - name: Checkout code
     23         uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
     24 
     25       - name: Set up QEMU
     26         uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
     27 
     28       - name: Set up Docker Buildx
     29         uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3
     30 
     31       - name: Docker meta
     32         id: meta
     33         uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5
     34         with:
     35           images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
     36 
     37       - name: Log in to the Container registry
     38         uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
     39         with:
     40           registry: ${{ env.REGISTRY }}
     41           username: ${{ github.actor }}
     42           password: ${{ secrets.GITHUB_TOKEN }}
     43 
     44       - name: Build and push
     45         uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6
     46         id: push
     47         with:
     48           platforms: linux/amd64,linux/arm64
     49           context: .
     50           push: ${{ github.event_name != 'pull_request' }}
     51           tags: ${{ steps.meta.outputs.tags }}
     52           labels: ${{ steps.meta.outputs.labels }}
     53         env:
     54           SOURCE_DATE_EPOCH: 0
     55 
     56       - name: Generate artifact attestation
     57         uses: actions/attest-build-provenance@v1
     58         with:
     59           subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
     60           subject-digest: ${{ steps.push.outputs.digest }}
     61           push-to-registry: true