ci: trigger #2
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: Build and Publish Docker Image | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.24.0-rc.1' } | |
- run: go install golang.org/dl/gotip@latest | |
- run: gotip download | |
- run: make generate | |
- run: git diff --exit-code | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.24.0-rc.1' } | |
- run: go install golang.org/dl/gotip@latest | |
- run: gotip download | |
- run: make fmt | |
- run: git diff --exit-code | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.24.0-rc.1' } | |
- run: go install golang.org/dl/gotip@latest | |
- run: gotip download | |
- run: make lint | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.24.0-rc.1' } | |
- run: go install golang.org/dl/gotip@latest | |
- run: gotip download | |
- run: make test | |
build: | |
needs: [ generate, fmt, lint, test ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: ghcr.io/${{ github.repository }}:latest |