|
|
|
@ -9,11 +9,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
name: Publish Docker image
|
|
|
|
name: Publish Docker image
|
|
|
|
|
|
|
|
|
|
|
|
on: workflow_dispatch
|
|
|
|
on:
|
|
|
|
|
|
|
|
push:
|
|
|
|
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
test:
|
|
|
|
|
|
|
|
name: Go Test
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
|
|
|
|
uses: actions/setup-go@v5
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
go-version-file: go.mod
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
|
|
|
|
run: go build -v ./...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
|
|
|
|
uses: robherley/go-test-action@v0
|
|
|
|
|
|
|
|
|
|
|
|
push_to_registry:
|
|
|
|
push_to_registry:
|
|
|
|
name: Push Docker image to Docker Hub
|
|
|
|
name: Push Docker image to Docker Hub
|
|
|
|
|
|
|
|
needs: test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
permissions:
|
|
|
|
packages: write
|
|
|
|
packages: write
|
|
|
|
|