Skip to content

Docker image build and push #780

Docker image build and push

Docker image build and push #780

Workflow file for this run

name: Docker image build and push
on:
push:
branches:
- 'master'
schedule:
- cron: '0 0 * * *'
jobs:
docker:
if: github.repository == 'brainboxdotcc/DPP'
runs-on: ubuntu-latest
concurrency:
group: docker-deployment
cancel-in-progress: false
steps:
- name: Harden Runner
uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604 # v2.5.0
with:
egress-policy: audit
-
name: Set up QEMU
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2.9.1
-
name: Login to DockerHub
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a # v2.10.0
with:
push: true
tags: brainboxdotcc/dpp
- # copy multiplatform image from dockerhub to ghcr
name: Push Image to multiple registries
uses: akhilerm/tag-push-action@f973043dc002b8e5a772c53e79441e6e1861e874 # v2.0.0
with:
src: docker.io/brainboxdotcc/dpp:latest
dst: |
ghcr.io/brainboxdotcc/dpp:latest