-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.38 KB
/
deploy.yaml
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
name: Build and publish Docker image
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
push_to_registry:
name: Build and push Docker image to GitHub Packages
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
ARCH: ["x86_64", "aarch64"]
PLAT: ["2014"]
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create tag from repo
run: | # Uses shell parameter expansion to lowercase
echo "TAG=ghcr.io/${GITHUB_REPOSITORY,,}-${{ matrix.PLAT }}_${{ matrix.ARCH }}:latest" >> $GITHUB_ENV
- name: Build and push image to GitHub Packages
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
build-args: |
ml_version=${{ matrix.PLAT }}
ml_arch=${{ matrix.ARCH }}
pull: true
push: true
tags: ${{ env.TAG }}