mirror of
https://github.com/JuLi0n21/homepage.git
synced 2026-04-19 15:20:05 +00:00
Updated the workflow to include login to a private Docker registry and changed the image tags for pushing.
37 lines
975 B
YAML
37 lines
975 B
YAML
name: Build and Push Astro Image
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Get Short SHA
|
|
id: vars
|
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
|
|
- 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: .
|
|
push: true
|
|
tags: |
|
|
docker-ui.illegalesachen.download/repository/astro-homepage:latest
|
|
docker-ui.illegalesachen.download/repository/astro-homepage:${{ steps.vars.outputs.sha_short }}
|