fixed tags #3
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: Build Docker image | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build-docker-image: | |
runs-on: ubuntu-24.04 | |
permissions: | |
packages: write | |
contents: read | |
attestations: write | |
id-token: write | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Log in to the Container registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: evgsentrium | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Extract metadata (tags, labels) for Docker | |
# id: meta | |
# uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
# with: | |
# images: | | |
# my-docker-hub-namespace/my-docker-hub-repository | |
# ghcr.io/${{ github.repository }} | |
- name: Build and push Docker images | |
id: push | |
uses: docker/[email protected] | |
with: | |
context: . | |
push: true | |
tags: ghcr.io/evgsentrium/hello:latest | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-name: ghcr.io/evgsentrium/hello | |
subject-digest: ${{ steps.push.outputs.digest }} | |
push-to-registry: true |