Skip to content

build: perform a docker build on each checkin #19

build: perform a docker build on each checkin

build: perform a docker build on each checkin #19

Workflow file for this run

on:
push:
branches:
- "**"
name: Build
env:
GO_VERSION: 1.22
REPO: ${{github.repository}}
jobs:
build:
name: Run checks and build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{env.GO_VERSION}}
- name: Vet
run: make vet
- name: Test
run: make test
- name: Build
run: make
docker-build:
runs-on: ubuntu-latest
name: Build the docker image
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v2
- name: Build Image
run: make image IMAGE=ghcr.io/${{env.REPO}}:${{ github.ref_name }}
- name: Push
run: docker push ghcr.io/${{env.REPO}}:${{ github.ref_name }}
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{env.GO_VERSION}}
- run: go fmt ./...
- name: Verify No Differences after format
run: test -z "$(git diff)"