-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.47 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
52
53
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
strategy:
max-parallel: 2
matrix:
include:
- ARCH: x86_64
OS: ubuntu-24.04
PLAT: "2014"
- ARCH: aarch64
OS: ubuntu-24.04-arm
PLAT: "2014"
# The type of runner that the job will run on
runs-on: ${{ matrix.OS }}
steps:
- name: Check out the repo
uses: actions/checkout@v4
- 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 (${{ matrix.ARCH }})
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
build-args: |
ml_version=${{ matrix.PLAT }}
ml_arch=${{ matrix.ARCH }}
pull: true
push: true
tags: ${{ env.TAG }}