Files
rdns-go/.gitea/workflows/docker.yml
T
tchivert 9365d08fcf
docker / docker (push) Successful in 12m7s
package / apt (push) Successful in 1m18s
ci: run go vet and tests before builds
2026-08-21 22:36:49 +02:00

51 lines
1.2 KiB
YAML

name: docker
on:
push:
branches:
- "main"
jobs:
docker:
runs-on: ubuntu-latest
container:
image: ghcr.io/catthehacker/ubuntu:act-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # all history for all branches and tags
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '>=1.26'
- name: Run tests
run: |
go vet ./...
go test -race ./...
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to registry
uses: docker/login-action@v2
with:
registry: git.rznet.fr
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
env:
ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119
with:
context: .
file: ./Dockerfile
platforms: |
linux/amd64
linux/arm64
push: true
tags: git.rznet.fr/tchivert/rdns:latest