fix: replace github.server_url with hardcoded gogs.tftsr.com for container access
This commit is contained in:
parent
82aae00858
commit
47b2e824e0
@ -26,12 +26,11 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
SERVER_URL: ${{ github.server_url }}
|
|
||||||
REPOSITORY: ${{ github.repository }}
|
REPOSITORY: ${{ github.repository }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
git init
|
git init
|
||||||
git remote add origin "${SERVER_URL}/${REPOSITORY}.git"
|
git remote add origin "https://gogs.tftsr.com/${REPOSITORY}.git"
|
||||||
git fetch --depth=1 origin ${{ github.head_ref }}
|
git fetch --depth=1 origin ${{ github.head_ref }}
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
|
|
||||||
@ -100,7 +99,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
TF_TOKEN: ${{ secrets.TFT_GITEA_TOKEN }}
|
TF_TOKEN: ${{ secrets.TFT_GITEA_TOKEN }}
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
SERVER_URL: ${{ github.server_url }}
|
|
||||||
REPOSITORY: ${{ github.repository }}
|
REPOSITORY: ${{ github.repository }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@ -119,7 +117,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
HTTP_CODE=$(curl -s --max-time 30 --connect-timeout 10 \
|
HTTP_CODE=$(curl -s --max-time 30 --connect-timeout 10 \
|
||||||
-o /tmp/review_post_response.json -w "%{http_code}" \
|
-o /tmp/review_post_response.json -w "%{http_code}" \
|
||||||
-X POST "${SERVER_URL}/api/v1/repos/${REPOSITORY}/pulls/${PR_NUMBER}/reviews" \
|
-X POST "https://gogs.tftsr.com/api/v1/repos/${REPOSITORY}/pulls/${PR_NUMBER}/reviews" \
|
||||||
-H "Authorization: token $TF_TOKEN" \
|
-H "Authorization: token $TF_TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "$BODY")
|
-d "$BODY")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user