forked from argoproj-labs/argocd-notifications
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.12 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v1
with:
go-version: '1.13.6'
- run: make test
- uses: actions-contrib/golangci-lint@v1
env:
GOROOT: ""
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }} #required
file: ./coverage.out
publish:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: docker login docker.pkg.github.com --username $USERNAME --password $PASSWORD
env:
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.TOKEN }}
- run: make image DOCKER_PUSH=true IMAGE_PREFIX=docker.pkg.github.com/argoproj-labs/argocd-notifications IMAGE_TAG=$(cat ./VERSION)-${GITHUB_SHA::8}