From 800c0793f944c16a59417bcfdb6df57357287f53 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Thu, 5 Feb 2026 22:07:33 +0000 Subject: [PATCH] Add gitea action to buld and publish container image --- .gitea/workflows/build-push.yaml | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitea/workflows/build-push.yaml diff --git a/.gitea/workflows/build-push.yaml b/.gitea/workflows/build-push.yaml new file mode 100644 index 0000000..ec6d5d6 --- /dev/null +++ b/.gitea/workflows/build-push.yaml @@ -0,0 +1,39 @@ +name: Build and Push container image +run-name: ${{ gitea.actor }} is building and pushing + +on: + create: + tags: "*" + +env: + GITEA_DOMAIN: git.fjla.uk + GITEA_REGISTRY_USER: owlbot + RESULT_IMAGE_NAME: owlboard/route-maps + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + options: --privileged + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.GITEA_DOMAIN }} + username: ${{ env.GITEA_REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} + - name: Build and Push image + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: true + tags: | + ${{ env.GITEA_DOMAIN }}/${{ env.RESULT_IMAGE_NAME }}:${{ gitea.ref_name }} + ${{ env.GITEA_DOMAIN }}/${{ env.RESULT_IMAGE_NAME }}:latest \ No newline at end of file