From cdbf44829164143a26b2bd95029eab8ef8e99924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Kore=C5=84?= Date: Wed, 7 Jan 2026 19:44:39 +0100 Subject: [PATCH] ci testy --- .gitea/workflows/build_container.yml | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .gitea/workflows/build_container.yml diff --git a/.gitea/workflows/build_container.yml b/.gitea/workflows/build_container.yml new file mode 100644 index 0000000..e9749e9 --- /dev/null +++ b/.gitea/workflows/build_container.yml @@ -0,0 +1,45 @@ +name: Build and Push Docker Image + +on: + push: + tags: + - '*' # Trigger on any git tag + +jobs: + build-image: + runs-on: ubuntu-latest + container: + image: docker:dind-rootless + + steps: + - name: Install dedps + run: | + apk add --no-cache nodejs npm git + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Build container image + env: + REGISTRY: https://gitea.papryk.com + IMAGE_NAME: papryk/dj-spangebob + TAG: ${{ gitea.ref_name }} + run: | + docker build -t "$IMAGE_NAME:$TAG" . + + - name: Log in to Docker registry + env: + REGISTRY: https://gitea.papryk.com + REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} + run: | + echo "$REGISTRY_PASSWORD" | podman login "$REGISTRY" -u "$REGISTRY_USERNAME" --password-stdin + + - name: Build and push Docker image + env: + REGISTRY: https://gitea.papryk.com + IMAGE_NAME: Papryk/dj-spangebob + TAG: ${{ gitea.ref_name }} + run: | + podman push "$REGISTRY/$IMAGE_NAME:$TAG" +