Skip to content

chore: Upgrade docker/build-push-action digest to 67a2d40 (#359) #1481

chore: Upgrade docker/build-push-action digest to 67a2d40 (#359)

chore: Upgrade docker/build-push-action digest to 67a2d40 (#359) #1481

name: Publish Docker image
on:
workflow_dispatch:
push:
branches:
- main
- develop
# Publish semver tags as releases.
tags: ['v*.*.*']
jobs:
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@327cd5a69de6c009b9ce71bce8395f28e651bf99
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@327cd5a69de6c009b9ce71bce8395f28e651bf99
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@8e1d5461f02b7886d3c1a774bfbd873650445aa2
with:
images: |
djdembeck/bragibooks
ghcr.io/${{ github.repository }}
- name: Build and push Docker images
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
with:
file: docker/Dockerfile
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}