-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 907 Bytes
/
build.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
name: build
on: [push, workflow_dispatch]
env:
DOCKER_REGISTRY: ghcr.io
DOCKER_REPO: ${{ github.repository_owner }}
DOCKER_IMAGE: cec-api
DOCKER_TAG: ${{ github.ref_name }}
DOCKER_PLATFORM: linux/amd64,linux/arm64
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker registry
uses: docker/login-action@v2
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish image
run: docker buildx build --platform ${DOCKER_PLATFORM} --tag "${DOCKER_REGISTRY}/${DOCKER_REPO}/${DOCKER_IMAGE}:${DOCKER_TAG}" --push .