This commit is contained in:
Marc
2025-10-02 09:48:41 +02:00
parent 1b74197680
commit 64d9b54d18

View File

@@ -0,0 +1,41 @@
name: Build and Push Shulker Image
on:
push:
branches: [ main ]
workflow_dispatch: {}
jobs:
build:
# Make sure this matches your runner label (e.g., ubuntu-latest, ubuntu-general, self-hosted)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Set image tags
id: meta
run: |
IMAGE="${{ secrets.REGISTRY_HOST }}/${{ secrets.REGISTRY_NAMESPACE }}/${{ secrets.IMAGE_NAME }}"
echo "image=${IMAGE}" >> $GITHUB_OUTPUT
echo "tag_latest=${IMAGE}:latest" >> $GITHUB_OUTPUT
echo "tag_sha=${IMAGE}:${GITHUB_SHA}" >> $GITHUB_OUTPUT
- name: Docker login (Gitea registry)
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login "${{ secrets.REGISTRY_HOST }}" -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
- name: Build image
run: |
docker build \
-f docker/shulker/Dockerfile \
-t "${{ steps.meta.outputs.tag_latest }}" \
-t "${{ steps.meta.outputs.tag_sha }}" \
.
- name: Push image
run: |
docker push "${{ steps.meta.outputs.tag_latest }}"
docker push "${{ steps.meta.outputs.tag_sha }}"