-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (38 loc) · 1.31 KB
/
main.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
name: MultiArch Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
DOCKER_REGISTRY: docker.io
DOCKER_USERNAME: deichten
DOCKER_IMAGE: sonos-vinyl
DOCKER_TARGET_PLATFORMS: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker BuildX
uses: docker/setup-buildx-action@v2
- name: Docker Login
uses: docker/#-action@v2
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build&Push Container
if: success()
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
platforms: ${{ env.DOCKER_TARGET_PLATFORMS }}
push: true
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }}:${{ github.run_number }},${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }}:latest