Files
josh 4dcd1f943b
build-and-push / test (push) Successful in 41s
build-and-push / build-and-push (push) Successful in 1m22s
Disable Go module cache in CI to avoid 4m+ timeout
Gitea's cache server is unreachable, causing setup-go to block on a
failed cache restore. Disable it since the Docker build layer caches
dependencies independently.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-03 21:44:12 -04:00

47 lines
1.1 KiB
YAML

name: build-and-push
on:
push:
branches: [main]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: false
- name: Run tests
run: go test ./...
- name: Vet
run: go vet ./...
build-and-push:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: gitea.thewrightserver.net
username: josh
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
file: deploy/Dockerfile
push: true
tags: |
gitea.thewrightserver.net/josh/provisioning:latest
gitea.thewrightserver.net/josh/provisioning:${{ github.sha }}