-
-
Notifications
You must be signed in to change notification settings - Fork 75
45 lines (43 loc) · 1.05 KB
/
main.yml
File metadata and controls
45 lines (43 loc) · 1.05 KB
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
name: Main
on:
push:
branches:
- master
tags:
- 'v**'
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Test
run: make test
publish-docs:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Update Docker hub metadata
uses: docker://mpepping/docker-hub-metadata-github-action
env:
IMAGE: ${{ github.repository }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
continue-on-error: true
publish:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build
shell: bash
run: make build
- name: Publish
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
make publish