fix: use github.* variables instead of GITEA_*
This commit is contained in:
parent
5969c096bc
commit
92f577c70b
1 changed files with 9 additions and 9 deletions
|
|
@ -7,7 +7,7 @@ on:
|
|||
- dev
|
||||
|
||||
env:
|
||||
IMAGE_TAG: ${{ GITEA_REF == 'refs/heads/dev' && 'dev' || 'latest' }}
|
||||
IMAGE_TAG: ${{ github.ref == 'refs/heads/dev' && 'dev' || 'latest' }}
|
||||
REPO_URL: https://git.sky-net.it
|
||||
|
||||
jobs:
|
||||
|
|
@ -20,12 +20,12 @@ jobs:
|
|||
run: |
|
||||
apk add --no-cache git
|
||||
git init
|
||||
git remote add origin ${{ env.REPO_URL }}/${{ GITEA_REPO }}.git
|
||||
git fetch --depth 1 origin ${{ GITEA_REF }}
|
||||
git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git
|
||||
git fetch --depth 1 origin ${{ github.ref }}
|
||||
git checkout FETCH_HEAD
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: npm install
|
||||
|
||||
- name: Run ESLint
|
||||
run: npm run lint
|
||||
|
|
@ -40,8 +40,8 @@ jobs:
|
|||
run: |
|
||||
apk add --no-cache git curl bash
|
||||
git init
|
||||
git remote add origin ${{ env.REPO_URL }}/${{ GITEA_REPO }}.git
|
||||
git fetch --depth 1 origin ${{ GITEA_REF }}
|
||||
git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git
|
||||
git fetch --depth 1 origin ${{ github.ref }}
|
||||
git checkout FETCH_HEAD
|
||||
|
||||
- name: Install Node.js and Sonar Scanner
|
||||
|
|
@ -57,7 +57,7 @@ jobs:
|
|||
run: |
|
||||
WORKDIR=${GITHUB_WORKSPACE:-$PWD}
|
||||
HOST_URL=${SONAR_HOST_URL:?SONAR_HOST_URL secret not set}
|
||||
BRANCH_NAME=${GITEA_REF#refs/heads/}
|
||||
BRANCH_NAME=${GITHUB_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')
|
||||
|
|
@ -105,8 +105,8 @@ jobs:
|
|||
- name: Manual Git Checkout
|
||||
run: |
|
||||
git init
|
||||
git remote add origin ${{ env.REPO_URL }}/${{ GITEA_REPO }}.git
|
||||
git fetch --depth 1 origin ${{ GITEA_REF }}
|
||||
git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git
|
||||
git fetch --depth 1 origin ${{ github.ref }}
|
||||
git checkout FETCH_HEAD
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue