Files
archipelago-docker/.gitea/workflows/build-push-docker.yml
T
Cleo 184b4750f5
Build and Push Docker Image / build (release) Failing after 1m1s
create workflow to build image on release
2026-07-01 22:34:16 +02:00

43 lines
1.5 KiB
YAML

name: Build and Push Docker Image
on:
release:
types: [ published ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: gitea.innovativename.xyz
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build Docker Image
env:
RELEASE_TAG: ${{ github.ref }}
SHORT_HASH: ${{ github.sha }}
run: |
# Build the image with the commit hash tag
docker build --build-arg BUILD_IDENTIFIER=${SHORT_HASH:0:5} -t gitea.innovativename.xyz/Cleo/archipelago-server-docker:${RELEASE_TAG} .
# Tag the same image as "latest"
docker tag gitea.innovativename.xyz/Cleo/archipelago-server-docker:${RELEASE_TAG} gitea.innovativename.xyz/Cleo/archipelago-server-docker:latest
- name: Push Docker Images
env:
RELEASE_TAG: ${{ github.ref }}
SHORT_HASH: ${{ github.sha }}
run: |
docker push gitea.innovativename.xyz/Cleo/archipelago-server-docker:${RELEASE_TAG}
docker push gitea.innovativename.xyz/Cleo/archipelago-server-docker:latest
- name: Log out from registry
if: always()
run: docker logout gitea.innovativename.xyz