-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (73 loc) · 2.46 KB
/
release-docker.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: release-docker
on:
push:
tags:
- '*'
jobs:
test:
strategy:
matrix:
go-version: [ 1.17.x ]
platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare for image tag
id: prep
run: |
VERSION=${GITHUB_REF#refs/tags/}
echo ::set-output name=version::${VERSION}
- name: Build and push appagent
uses: docker/build-push-action@v2
with:
context: ./
file: docker/appagent.Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/acar/appagent:stable
ghcr.io/${{ github.repository_owner }}/acar/appagent:${{ steps.prep.outputs.version }}
- name: Build and push controlplane
uses: docker/build-push-action@v2
with:
context: ./
file: docker/controlplane.Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/acar/controlplane:stable
ghcr.io/${{ github.repository_owner }}/acar/controlplane:${{ steps.prep.outputs.version }}
- name: Build and push dataplane
uses: docker/build-push-action@v2
with:
context: ./
file: docker/dataplane.Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/acar/dataplane:stable
ghcr.io/${{ github.repository_owner }}/acar/dataplane:${{ steps.prep.outputs.version }}
- name: Build and push monitoring
uses: docker/build-push-action@v2
with:
context: ./
file: docker/monitoring.Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/acar/monitoring:stable
ghcr.io/${{ github.repository_owner }}/acar/monitoring:${{ steps.prep.outputs.version }}
- name: Build and push srnode-agent
uses: docker/build-push-action@v2
with:
context: ./
file: docker/srnode-agent.Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/acar/srnode-agent:stable
ghcr.io/${{ github.repository_owner }}/acar/srnode-agent:${{ steps.prep.outputs.version }}