image-signed-ghat(static) #1
Workflow file for this run
This file contains 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: image-signed-ghat(static) | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
packages: write | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
- name: Log into ghcr.io | |
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- id: lower-repo | |
run: | | |
echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
- name: Build and push image | |
id: push-step | |
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a | |
with: | |
push: true | |
tags: ghcr.io/${{ env.IMAGE_NAME }}:static | |
context: . | |
file : Dockerfile.static | |
- name: Attest image | |
uses: github-early-access/generate-build-provenance@main | |
with: | |
subject-name: ghcr.io/${{ env.IMAGE_NAME }} | |
subject-digest: ${{ steps.push-step.outputs.digest }} | |
push-to-registry: true |