-
Notifications
You must be signed in to change notification settings - Fork 123
50 lines (42 loc) · 1.25 KB
/
main.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
name: ci
on: push
jobs:
kubeconform-test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: test
run: make docker-test
- name: build
run: make goreleaser-build-static
- name: acceptance-test
run: make docker-acceptance
openapi2jsonschema-test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: test
working-directory: ./scripts
run: make docker-test docker-acceptance
goreleaser:
runs-on: ubuntu-latest
needs:
- kubeconform-test
- openapi2jsonschema-test
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # https://github.com/goreleaser/goreleaser-action/issues/56
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- name: goreleaser
run: |
echo "${{ github.token }}" | docker login https://ghcr.io -u ${GITHUB_ACTOR} --password-stdin
GITHUB_ACTOR=$(echo ${GITHUB_ACTOR} | tr '[:upper:]' '[:lower:]')
GIT_OWNER=${GITHUB_ACTOR} make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}