feat: add docker build to release workflow

This commit is contained in:
Stefanuk12 2025-04-14 20:20:08 +01:00
parent e1619da871
commit 8d341af69d
No known key found for this signature in database
GPG key ID: 7E19B1E4C83A2A35

View file

@ -149,4 +149,33 @@ jobs:
name: v${{ env.VERSION }}
draft: true
prerelease: ${{ startsWith(env.VERSION, '0') }}
files: artifacts/*
files: artifacts/*
build-and-push-image:
runs-on: ubuntu-latest
permissions:
packages: write
needs: [ prepare ]
if: ${{ needs.prepare.outputs.found == 'false' }}
env:
VERSION: ${{ needs.prepare.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/stefanuk12/registry:latest
ghcr.io/stefanuk12/registry:v${{ env.VERSION }}
ghcr.io/stefanuk12/registry:${{ github.sha }}