From 8a64cdcb836a1fdc1bac1012043fb6f4e90ec75e Mon Sep 17 00:00:00 2001 From: Skydust Date: Wed, 9 Apr 2025 20:48:20 +0200 Subject: [PATCH] Adding workflow to push a docker for the action --- .gitea/workflows/deployment.yml | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .gitea/workflows/deployment.yml diff --git a/.gitea/workflows/deployment.yml b/.gitea/workflows/deployment.yml new file mode 100644 index 0000000..8c108de --- /dev/null +++ b/.gitea/workflows/deployment.yml @@ -0,0 +1,38 @@ +name: Production deployment + +on: + push: + branches: + - '**' # Any branch + +jobs: + build-docker-images: + name: "Build and pushing" + runs-on: skydust-runner + steps: + - name: Check out repo's default branch + uses: actions/checkout@v4 + - name: Docker login + uses: https://gitea.skydust.fr/actions/docker-login-skydust@main + with: + user: ${{ gitea.repository_owner }} + pass: ${{ secrets.DOCKER_WRITEABLE_TOKEN }} + - name: Set branch name and Docker tag + id: set_tag + run: | + raw_ref="${GITHUB_REF#refs/heads/}" + + # Replace any slashes with dashes (for Docker tag compatibility) + safe_tag=$(echo "$raw_ref" | tr '/' '-') + + echo "Branch: $raw_ref" + echo "Safe Tag: $safe_tag" + + echo "tag=$safe_tag" >> "$GITEA_OUTPUT" + - name: Build and push + uses: https://gitea.skydust.fr/actions/docker-build-skydust@main + with: + imageName: "${GITHUB_REPOSITORY}:${{ steps.set_tag.outputs.tag }}" + push: true + pullCache: true + platform: linux/amd64