This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
60 lines (54 loc) · 1.67 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Publish Docker Containers to Registries
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
build-and-push:
runs-on: ubuntu-latest
name: Build & Push (${{ matrix.platform }})
permissions:
contents: read
packages: write
strategy:
matrix:
platform: [ "linux/amd64", "linux/arm64" ]
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
if: matrix.platform == 'linux/arm64'
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
id: buildx
with:
version: latest
platforms: ${{ matrix.platform }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push to GitHub Container Registry
uses: docker/[email protected]
with:
builder: ${{ steps.buildx.outputs.name }}
push: true
files: docker-compose.yml, docker-compose.ghcr.yml
# - name: Login to Azure Container Registry
# uses: docker/login-action@v2
# with:
# registry: omegatriagecontainerreg.azurecr.io
# username: ${{ secrets.AZURE_CLIENT_ID }}
# password: ${{ secrets.AZURE_CLIENT_SECRET }}
#
# - name: Build and Push to Azure Container Registry
# uses: docker/[email protected]
# with:
# builder: ${{ steps.buildx.outputs.name }}
# push: true
# files: docker-compose.yml, docker-compose.azure.yml