Files
sdlc-orchestrator/.gitea/workflows/publish.yml
T
Daniel SamsonandClaude Opus 4.6 1b25c39d1b
Publish Image / publish (push) Successful in 46s
Add CI workflow to publish Docker image on tag
Builds and pushes to registry.samson.media on any version tag,
tagged with both the version and latest.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 12:48:36 +01:00

42 lines
999 B
YAML

name: Publish Image
on:
push:
tags:
- 'v*'
concurrency:
group: publish
cancel-in-progress: false
jobs:
publish:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Type check
run: npx tsc --noEmit
- name: Extract tag
id: tag
run: echo "version=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
- name: Log in to registry
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login registry.samson.media -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
- name: Build and push
run: |
IMAGE=registry.samson.media/sdlc-orchestrator
docker build -t "$IMAGE:${{ steps.tag.outputs.version }}" -t "$IMAGE:latest" .
docker push "$IMAGE:${{ steps.tag.outputs.version }}"
docker push "$IMAGE:latest"