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"