mirror of
https://github.com/pacnpal/markov-discord.git
synced 2025-12-20 03:01:04 -05:00
68 lines
1.9 KiB
YAML
Executable File
68 lines
1.9 KiB
YAML
Executable File
name: MultiArchDockerBuild
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- develop
|
|
|
|
jobs:
|
|
build_multi_arch_image:
|
|
name: Build multi-arch Docker image.
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
install: true
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: charlocharlie
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push master
|
|
if: ${{ github.ref == 'refs/heads/master' }}
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
target: deploy
|
|
push: true
|
|
tags: |
|
|
charlocharlie/markov-discord:latest
|
|
ghcr.io/${{ github.repository }}:latest
|
|
platforms: linux/amd64,linux/arm64
|
|
build-args: |
|
|
COMMIT_SHA=${{ github.sha }}
|
|
cache-from: type=gha,scope=${{ github.workflow }}
|
|
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
|
|
|
|
- name: Build and push dev
|
|
if: ${{ github.ref == 'refs/heads/develop' }}
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
target: deploy
|
|
push: true
|
|
tags: |
|
|
charlocharlie/markov-discord:dev
|
|
ghcr.io/claabs/markov-discord:dev
|
|
platforms: linux/amd64
|
|
build-args: |
|
|
COMMIT_SHA=${{ github.sha }}
|
|
cache-from: type=gha,scope=${{ github.workflow }}
|
|
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
|