From 09d854ffb1793161d5bfbd8ca0c3f80b520fd40d Mon Sep 17 00:00:00 2001 From: nocci Date: Fri, 6 Mar 2026 15:43:55 +0000 Subject: [PATCH] Fix Forgejo workflow: use GITEA_* variables instead of github.* --- .forgejo/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 60e07b7..6d0621b 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -7,7 +7,7 @@ on: - dev env: - IMAGE_TAG: ${{ github.ref == 'refs/heads/dev' && 'dev' || 'latest' }} + IMAGE_TAG: ${{ GITEA_REF == 'refs/heads/dev' && 'dev' || 'latest' }} REPO_URL: https://git.sky-net.it jobs: @@ -20,8 +20,8 @@ jobs: run: | apk add --no-cache git git init - git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git - git fetch --depth 1 origin ${{ github.ref }} + git remote add origin ${{ env.REPO_URL }}/${{ GITEA_REPO }}.git + git fetch --depth 1 origin ${{ GITEA_REF }} git checkout FETCH_HEAD - name: Install dependencies @@ -40,8 +40,8 @@ jobs: run: | apk add --no-cache git curl bash git init - git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git - git fetch --depth 1 origin ${{ github.ref }} + git remote add origin ${{ env.REPO_URL }}/${{ GITEA_REPO }}.git + git fetch --depth 1 origin ${{ GITEA_REF }} git checkout FETCH_HEAD - name: Install Node.js and Sonar Scanner @@ -66,7 +66,7 @@ jobs: run: | WORKDIR=${GITHUB_WORKSPACE:-$PWD} HOST_URL=${SONAR_HOST_URL:?SONAR_HOST_URL secret not set} - BRANCH_NAME=${GITHUB_REF#refs/heads/} + BRANCH_NAME=${GITEA_REF#refs/heads/} PROJECT_KEY=${SONAR_PROJECT_KEY:-} if [ -z "$PROJECT_KEY" ] && [ -f sonar-project.properties ]; then PROJECT_KEY=$(grep -E '^sonar.projectKey=' sonar-project.properties | cut -d= -f2 | tr -d '\r') @@ -111,8 +111,8 @@ jobs: - name: Manual Git Checkout run: | git init - git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git - git fetch --depth 1 origin ${{ github.ref }} + git remote add origin ${{ env.REPO_URL }}/${{ GITEA_REPO }}.git + git fetch --depth 1 origin ${{ GITEA_REF }} git checkout FETCH_HEAD - name: Set up Docker Buildx