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>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
55dee1f2bd
commit
1b25c39d1b
@@ -0,0 +1,41 @@
|
||||
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"
|
||||
Reference in New Issue
Block a user