anubis/.github/workflows/docker-pr.yml
Xe Iaso 56cdb2e51b
Fix docker image CI for pull requests (#84)
Closes #65

Pull request images will now be `ttl.sh/techaro/pr-{number}/anubis:24h`.
2025-03-22 11:26:49 -04:00

44 lines
No EOL
950 B
YAML

name: Docker image builds (pull requests)
on:
pull_request:
branches: [ "main" ]
env:
DOCKER_METADATA_SET_OUTPUT_ENV: "true"
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.24.x'
- uses: ko-build/setup-ko@v0.8
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/techarohq/anubis
- name: Build and push
id: build
run: |
go run ./cmd/containerbuild --docker-repo ghcr.io/techarohq/anubis --slog-level debug
env:
PULL_REQUEST_ID: ${{ github.event.number }}
- run: |
echo "Test this with:"
echo "docker pull ${{ steps.build.outputs.docker_image }}"