From a0ae8319be4ca00da8154dbfa9624e70a2deb8ca Mon Sep 17 00:00:00 2001 From: Jan Novak Date: Sat, 14 Feb 2026 23:31:59 +0100 Subject: [PATCH] Add Gitea Actions CI pipeline for Docker image builds Triggers on tag push or manual dispatch. Builds the image using build/Dockerfile and pushes to the Gitea container registry. Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/build.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..9563caa --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,35 @@ +name: Build and Push + +on: + workflow_dispatch: + inputs: + tag: + description: 'Image tag' + required: true + default: 'latest' + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + + - name: Login to Gitea registry + run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login -u ${{ github.actor }} --password-stdin gitea.home.hrajfrisbee.cz + + - name: Build and push + run: | + TAG=${{ github.ref_name }} + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + TAG=${{ inputs.tag }} + fi + IMAGE=gitea.home.hrajfrisbee.cz/${{ github.repository }}:$TAG + docker build -f build/Dockerfile -t $IMAGE . + docker push $IMAGE