-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.18 KB
/
mars-release.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
name: Build Release and Push
on:
push:
tags:
- "*"
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_USERNAME: ${{ vars.DOCKERHUB_USERNAME }}
jobs:
build-push:
name: ${{ matrix.image }} - ${{ matrix.arch }} docker build
runs-on: ${{ fromJSON('{"arm64":"buildjet-2vcpu-ubuntu-2204-arm","amd64":"ubuntu-20.04"}')[matrix.arch] }}
strategy:
matrix:
arch:
- amd64
- arm64
image:
- mars
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # include tags for VERSION detection
- name: Build container
uses: ./.github/actions/build-docker-images
with:
arch: ${{ matrix.arch }}
image: .
git_tag: $GITHUB_REF_NAME
push-manifests:
runs-on: ubuntu-20.04
needs:
- build-push
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Configure DockerHub
uses: ./.github/actions/configure-dockerhub
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Create and push manifest for multiarch
run: make push-manifests GIT_TAG=$GITHUB_REF_NAME