Skip to content

chore: Upgrade docker/build-push-action digest to ca877d9 (#360) #1495

chore: Upgrade docker/build-push-action digest to ca877d9 (#360)

chore: Upgrade docker/build-push-action digest to ca877d9 (#360) #1495

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@ca877d9245402d1537745e0e356eab47c3520991
with:
file: docker/Dockerfile
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}