forked from mikkeloscar/pdb-controller
-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (33 loc) · 1014 Bytes
/
Copy pathci.yaml
File metadata and controls
34 lines (33 loc) · 1014 Bytes
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
name: ci
on:
push:
pull_request:
create:
tags: '*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.22'
- run: go install github.com/mattn/goveralls@latest
- run: |
make test
make
make build.docker
- run: goveralls -coverprofile=profile.cov -service=github
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push the latest Docker image
run: |
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
VERSION=latest make build.push
if: github.ref == 'refs/heads/master'
- name: Push the release Docker image
run: |
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
VERSION=${{ github.ref_name }} make build.push
if: startsWith(github.ref, 'refs/tags/')