forked from volcano-sh/volcano
-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (53 loc) · 1.63 KB
/
release.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
name: release
on:
push:
tags: ["v*"]
jobs:
docker:
runs-on: ubuntu-latest
env:
GOPATH: /home/runner/work/${{ github.repository }}
steps:
- name: Prepare
id: prep
run: |
echo ::set-output name=image_tag::${GITHUB_REF/refs\/tags\//}
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
- name: Install musl
run: |
wget http://musl.libc.org/releases/musl-1.2.1.tar.gz
tar -xf musl-1.2.1.tar.gz && cd musl-1.2.1
./configure
make && sudo make install
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
path: ./src/github.com/${{ github.repository }}
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Run verify test
run: |
make verify
make TAG=latest generate-yaml
make verify-generated-yaml
make unit-test
working-directory: ./src/github.com/${{ github.repository }}
- name: Login to Github container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Images
run: make release-images
env:
IMAGE_PREFIX: ghcr.io/spotify/volcano/vc
TAG: ${{ steps.prep.outputs.image_tag }}
CC: /usr/local/musl/bin/musl-gcc
working-directory: ./src/github.com/${{ github.repository }}