-
Notifications
You must be signed in to change notification settings - Fork 37
44 lines (38 loc) · 1.04 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
name: main
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dist: [debian, alpine, jdk11, jdk17]
steps:
- uses: actions/checkout@v2
- name: build ${{ matrix.dist }}
run: make build-${{ matrix.dist }}
publish-tag:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- name: publish
shell: bash
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |-
export GIT_TAG="$(echo ${{ github.event.ref }} | sed 's|refs/tags/||g')"
make publish
publish-latest:
needs: build
runs-on: ubuntu-latest
if: github.event.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- name: publish
shell: bash
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: make publish