This repository has been archived on 2026-10-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
imagelab-runpod/.gitea/workflows/build.yml
T
donnyandClaude Opus 4.7 38117707e9
Build and push image / build (push) Successful in 5m31s
ci: rename secret to REGISTRY_TOKEN (Gitea reserves GITEA_ prefix)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 22:15:47 -07:00

48 lines
1.3 KiB
YAML

name: Build and push image
on:
push:
branches:
- main
- master
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Gitea registry
uses: docker/login-action@v3
with:
registry: gitea.dev.blueoceanswim.com
username: ${{ gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Compute tags
id: tags
run: |
IMAGE="gitea.dev.blueoceanswim.com/donny/imagelab-runpod"
TAGS="${IMAGE}:latest"
if [ -n "${GITHUB_REF_NAME:-}" ] && [ "${GITHUB_REF_TYPE:-}" = "tag" ]; then
TAGS="${TAGS},${IMAGE}:${GITHUB_REF_NAME}"
fi
SHA_SHORT=$(echo "${GITHUB_SHA}" | cut -c1-7)
TAGS="${TAGS},${IMAGE}:${SHA_SHORT}"
echo "tags=${TAGS}" >> "$GITHUB_OUTPUT"
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.tags.outputs.tags }}
cache-from: type=registry,ref=gitea.dev.blueoceanswim.com/donny/imagelab-runpod:buildcache
cache-to: type=registry,ref=gitea.dev.blueoceanswim.com/donny/imagelab-runpod:buildcache,mode=max