chore(ci): run code coverage on main push (#870)

* chore(ci): run code coverage on main push

* merge workflows for pushes to main

* add workflow dispatch for production releases

Co-authored-by: Simon Aronsson <simme@arcticbit.se>
pull/914/head
nils måsén 3 years ago committed by GitHub
parent b644ec6829
commit bf8dec1b88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,23 +1,47 @@
name: Release (Develop) name: Push to main
on: on:
workflow_dispatch: {}
push: push:
branches: branches:
- main - main
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Go
- uses: jerray/publish-docker-action@master uses: actions/setup-go@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} go-version: 1.15
password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Build
file: dockerfiles/Dockerfile.self-contained run: go build -v ./...
repository: containrrr/watchtower test:
tags: latest-dev runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Test
run: go test -v -coverprofile coverage.out -covermode atomic ./...
- name: Publish coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
publish:
needs:
- build
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jerray/publish-docker-action@master
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
file: dockerfiles/Dockerfile.self-contained
repository: containrrr/watchtower
tags: latest-dev

@ -1,6 +1,7 @@
name: Release (Production) name: Release (Production)
on: on:
workflow_dispatch: {}
release: release:
types: types:
- created - created

Loading…
Cancel
Save