-
Notifications
You must be signed in to change notification settings - Fork 8
59 lines (56 loc) · 2.17 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Release Docker images
on:
# push:
# tags:
# - '*'
pull_request:
branches: [ main ]
jobs:
# build and publish docker images
kaniko:
strategy:
matrix:
arch: [amd64, arm64]
service: [worker, proxy, agent]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: docker build and push
uses: aevea/[email protected]
with:
registry: harbor.clyso.com
username: "${{ secrets.DOCKER_USER }}"
password: ${{ secrets.DOCKER_PASSWORD }}
image: chorus/${{ matrix.service }}-${{ matrix.arch }}
build_file: Dockerfile
tag: test2
# tag: ${{ github.ref_name }}
strip_tag_prefix: v
tag_with_latest: false
extra_args: "--custom-platform=linux/${{ matrix.arch }} --build-arg GIT_TAG=${{ github.ref_name }} --build-arg GIT_COMMIT=${{ github.sha }} --build-arg SERVICE=${{ matrix.service }} --build-arg GOARCH=${{ matrix.arch }}"
# upload docker manifest to support multi-arch images
manifest:
needs: kaniko
runs-on: ubuntu-latest
strategy:
matrix:
service: [worker, proxy, agent]
steps:
- name: Push manifest
uses: pixelfederation/[email protected] #check for latest tag
with:
username: "${{ secrets.DOCKER_USER }}"
password: ${{ secrets.DOCKER_PASSWORD }}
platforms: linux/amd64,linux/arm64
template: harbor.clyso.com/chorus/${{ matrix.service }}-ARCH:test2
target: harbor.clyso.com/chorus/${{ matrix.service }}:test2
# template: harbor.clyso.com/chorus/${{ matrix.service }}-ARCH:${{ github.ref_name }}
# target: harbor.clyso.com/chorus/${{ matrix.service }}:${{ github.ref_name }}
# - name: Tag latest
# uses: pixelfederation/[email protected] #check for latest tag
# with:
# username: "${{ secrets.DOCKER_USER }}"
# password: ${{ secrets.DOCKER_PASSWORD }}
# platforms: linux/amd64,linux/arm64
# template: harbor.clyso.com/chorus/${{ matrix.service }}-ARCH:${{ github.ref_name }}
# target: harbor.clyso.com/chorus/${{ matrix.service }}:latest