mirror of
https://gitlab.com/niansa/discord_llama.git
synced 2025-03-06 20:48:25 +01:00
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
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: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
-
|
|
name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
-
|
|
name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
-
|
|
name: Build and push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
push: true
|
|
tags: brainboxdotcc/dpp
|
|
- # copy multiplatform image from dockerhub to ghcr
|
|
name: Push Image to multiple registries
|
|
uses: akhilerm/tag-push-action@v2.0.0
|
|
with:
|
|
src: docker.io/brainboxdotcc/dpp:latest
|
|
dst: |
|
|
ghcr.io/brainboxdotcc/dpp:latest
|