Files
TFMC-Discord/.gitea/workflows/build-and-push-shulker.yml
Marc d262682ed5
All checks were successful
Build and Push Shulker Image to gitea registry / build (push) Successful in 1m49s
updated name of image to be in the build and push
2025-10-12 16:51:54 +02:00

42 lines
1.3 KiB
YAML

name: Build and Push Shulker Image to gitea registry
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 }}/tfmc-shulker"
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 }}"