forked from docs/doc-exports
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fa15599cbc | |||
| 6ece38e4db |
@ -3,7 +3,7 @@ name: Run HCDC
|
|||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened, reopened, synchronize, edited]
|
types: [opened, reopened, synchronize, edited]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
@ -23,6 +23,14 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
token: ${{ gitea.token }}
|
token: ${{ gitea.token }}
|
||||||
|
|
||||||
|
- name: Create local branch for PR head (same repo)
|
||||||
|
if: ${{ gitea.event.pull_request.head.repo.full_name == gitea.repository }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
git checkout -B "${{ gitea.event.pull_request.head.ref }}" --no-track
|
||||||
|
git branch --show-current
|
||||||
|
|
||||||
- name: Checkout PR head (fork via PR ref)
|
- name: Checkout PR head (fork via PR ref)
|
||||||
if: ${{ gitea.event.pull_request.head.repo.full_name != gitea.repository }}
|
if: ${{ gitea.event.pull_request.head.repo.full_name != gitea.repository }}
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
@ -33,6 +41,14 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
token: ${{ gitea.token }}
|
token: ${{ gitea.token }}
|
||||||
|
|
||||||
|
- name: Create local branch for PR head (fork)
|
||||||
|
if: ${{ gitea.event.pull_request.head.repo.full_name != gitea.repository }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
git checkout -B "${{ gitea.event.pull_request.head.ref }}" --no-track
|
||||||
|
git branch --show-current
|
||||||
|
|
||||||
- name: Checkout base
|
- name: Checkout base
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -43,7 +59,6 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
token: ${{ gitea.token }}
|
token: ${{ gitea.token }}
|
||||||
|
|
||||||
|
|
||||||
- name: Get OTC token
|
- name: Get OTC token
|
||||||
id: otc
|
id: otc
|
||||||
uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/get-otc-token@v1
|
uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/get-otc-token@v1
|
||||||
|
|||||||
Reference in New Issue
Block a user