better error messages (#159) #240
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Build Action | |
on: | |
pull_request: | |
branches: | |
- master | |
release: | |
types: | |
- published | |
push: | |
branches: | |
- master | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
name: Compile and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.22 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
cache: false | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
args: -p bugs -p unused --timeout=3m | |
- name: break if proto modifications where not committed | |
run: | | |
make proto | |
- name: Check if there are changes | |
uses: tj-actions/verify-changed-files@v20 | |
id: verify-changed-files | |
- name: Process changes | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
run: echo "Changes exist" | |
- name: build and test | |
run: | | |
make ci | |
- name: Publish Codecoverage report | |
run: bash <(curl -s https://codecov.io/bash) | |
container: | |
# TODO skip for external contributors | |
name: Build Container | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Make tag | |
run: | | |
[ "${GITHUB_EVENT_NAME}" == 'pull_request' ] && echo "tag=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV || true | |
[ "${GITHUB_EVENT_NAME}" == 'release' ] && echo "tag=${GITHUB_REF##*/}" >> $GITHUB_ENV || true | |
[ "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=latest" >> $GITHUB_ENV || true | |
- name: Build and push image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.tag }} | |
bench: | |
name: Benchmark | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.22 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
cache: false | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: run benchmark | |
run: | | |
make bench |