Modify Docker build workflow for private registry

Updated the workflow to include login to a private Docker registry and changed the image tags for pushing.
This commit is contained in:
JuLi0n21
2026-03-01 21:25:40 +01:00
committed by GitHub
parent 533928da8a
commit e307013944

View File

@@ -1,4 +1,4 @@
name: Build Astro Image
name: Build and Push Astro Image
on:
push:
@@ -19,19 +19,18 @@ jobs:
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build and Export to Docker
- name: Login to Private Registry
uses: docker/login-action@v3
with:
registry: docker-ui.illegalesachen.download
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
load: false
push: true
tags: |
astro:latest
astro:${{ steps.vars.outputs.sha_short }}
outputs: type=docker,dest=/tmp/astro-image.tar
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: astro-docker-${{ steps.vars.outputs.sha_short }}
path: /tmp/astro-image.tar
retention-days: 7
docker-ui.illegalesachen.download/repository/astro-homepage:latest
docker-ui.illegalesachen.download/repository/astro-homepage:${{ steps.vars.outputs.sha_short }}