feat(ci): add build-image job to release workflow

This commit is contained in:
Jan K9f 2025-04-24 12:19:55 +02:00
parent ef069d7d18
commit 0f96b284db
Signed by: jank
GPG key ID: 22BEAC760B3333D6

View file

@ -31,3 +31,28 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
build-image:
needs: release
runs-on: ubuntu-latest
name: Build Docker Image
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure full history is available
- name: Extract tag
run: |
TAG=$(git describe --tags --abbrev=0)
echo "TAG=$TAG" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
- name: Build Image
run: docker buildx build -f backend/.docker/Dockerfile -t git.kjan.de/szut/casino-backend:${{ env.TAG }} -t git.kjan.de/szut/casino-backend:latest backend
- name: Login
uses: docker/login-action@v3
with:
registry: git.kjan.de
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Push
run: docker push git.kjan.de/szut/casino-backend:latest