Skip to content

Add back permissions #30

Add back permissions

Add back permissions #30

# TODO SHAs and updating them
# TODO check metadata action
#
# https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-docker-images
# https://github.com/marketplace/actions/build-and-push-docker-images
name: Simple Build
on:
push:
jobs:
docker:
permissions: # needed for signing and attestations
id-token: write
attestations: write
runs-on: ubuntu-latest
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
amouat/images-bite-back
-
name: Build and push
uses: docker/build-push-action@v6
with:
#file: Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# -
# name: Attest
# uses: actions/attest-build-provenance@v1
# id: attest
# with:
# subject-name: index.docker.io/images-bite-back
# subject-digest: ${{ steps.build.outputs.digest }}
# push-to-registry: true