-
Notifications
You must be signed in to change notification settings - Fork 20
46 lines (39 loc) · 1.11 KB
/
docker.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
name: DockerImage
on:
release:
types: [published]
jobs:
release:
name: Release Polaris Sidecar Docker Image
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux]
goarch: [amd64]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.POLARIS_DOCKER_NAME }}
password: ${{ secrets.POLARIS_DOCKER_PASSWORD }}
- name: Build
id: build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
DOCKER_REPOSITORY: polarismesh/polaris-sidecar
DOCKER_TAG: ${{ steps.get_version.outputs.VERSION }}
run: |
ls -lstrh
bash build_docker.sh ${DOCKER_TAG}