Skip to content

feat: add cli flags (#2) #6

feat: add cli flags (#2)

feat: add cli flags (#2) #6

Workflow file for this run

name: CI
on:
push: { branches: [ main ] }
pull_request:
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
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v4
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:latest