Configure renovate. #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Simple Build | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| docker: | |
| permissions: # needed for signing and attestations | |
| id-token: write # write seems weird, but it is correct per docs | |
| attestations: write | |
| contents: read | |
| packages: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Install Cosign | |
| uses: sigstore/cosign-installer@398d4b0eeef1380460a10c8013a76f728fb906ac # v3.9.1 | |
| - | |
| name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3 | |
| - | |
| name: Login to GitHub Container Registry | |
| uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - | |
| name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5 | |
| with: | |
| images: | | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-simple | |
| labels: | | |
| org.opencontainers.image.description=Demo Simple Build | |
| - | |
| name: Build and push | |
| id: build | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6 | |
| with: | |
| file: Dockerfile | |
| platforms: linux/amd64 | |
| push: true | |
| sbom: true | |
| provenance: mode=max | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| - | |
| name: Attest | |
| uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v1 | |
| id: attest | |
| with: | |
| subject-name: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-simple | |
| subject-digest: ${{ steps.build.outputs.digest }} | |
| push-to-registry: true | |
| - | |
| name: Sign the images with GitHub OIDC Token | |
| env: | |
| DIGEST: ${{ steps.build.outputs.digest }} | |
| TAGS: ${{ steps.meta.outputs.tags }} | |
| run: | | |
| images="" | |
| for tag in ${TAGS}; do | |
| images+="${tag}@${DIGEST} " | |
| done | |
| cosign sign --yes ${images} |