mirror of
https://github.com/JuLi0n21/homepage.git
synced 2026-04-19 15:20:05 +00:00
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:
25
.github/workflows/docker-build.yml
vendored
25
.github/workflows/docker-build.yml
vendored
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user