Fix Forgejo workflow: use GITEA_* variables instead of github.*
This commit is contained in:
parent
96df8cb3d4
commit
09d854ffb1
1 changed files with 8 additions and 8 deletions
|
|
@ -7,7 +7,7 @@ on:
|
||||||
- dev
|
- dev
|
||||||
|
|
||||||
env:
|
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
|
REPO_URL: https://git.sky-net.it
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -20,8 +20,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache git
|
apk add --no-cache git
|
||||||
git init
|
git init
|
||||||
git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git
|
git remote add origin ${{ env.REPO_URL }}/${{ GITEA_REPO }}.git
|
||||||
git fetch --depth 1 origin ${{ github.ref }}
|
git fetch --depth 1 origin ${{ GITEA_REF }}
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|
@ -40,8 +40,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache git curl bash
|
apk add --no-cache git curl bash
|
||||||
git init
|
git init
|
||||||
git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git
|
git remote add origin ${{ env.REPO_URL }}/${{ GITEA_REPO }}.git
|
||||||
git fetch --depth 1 origin ${{ github.ref }}
|
git fetch --depth 1 origin ${{ GITEA_REF }}
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
|
|
||||||
- name: Install Node.js and Sonar Scanner
|
- name: Install Node.js and Sonar Scanner
|
||||||
|
|
@ -66,7 +66,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
WORKDIR=${GITHUB_WORKSPACE:-$PWD}
|
WORKDIR=${GITHUB_WORKSPACE:-$PWD}
|
||||||
HOST_URL=${SONAR_HOST_URL:?SONAR_HOST_URL secret not set}
|
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:-}
|
PROJECT_KEY=${SONAR_PROJECT_KEY:-}
|
||||||
if [ -z "$PROJECT_KEY" ] && [ -f sonar-project.properties ]; then
|
if [ -z "$PROJECT_KEY" ] && [ -f sonar-project.properties ]; then
|
||||||
PROJECT_KEY=$(grep -E '^sonar.projectKey=' sonar-project.properties | cut -d= -f2 | tr -d '\r')
|
PROJECT_KEY=$(grep -E '^sonar.projectKey=' sonar-project.properties | cut -d= -f2 | tr -d '\r')
|
||||||
|
|
@ -111,8 +111,8 @@ jobs:
|
||||||
- name: Manual Git Checkout
|
- name: Manual Git Checkout
|
||||||
run: |
|
run: |
|
||||||
git init
|
git init
|
||||||
git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git
|
git remote add origin ${{ env.REPO_URL }}/${{ GITEA_REPO }}.git
|
||||||
git fetch --depth 1 origin ${{ github.ref }}
|
git fetch --depth 1 origin ${{ GITEA_REF }}
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue