forked from docs/doc-exports
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e7eccd7d1 |
19
.gitea/workflows/get-token.yaml
Normal file
19
.gitea/workflows/get-token.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
name: Run HCDC
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize, edited]
|
||||
|
||||
jobs:
|
||||
get-token:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Get OTC token
|
||||
id: otc
|
||||
uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/get-otc-token@v1
|
||||
with:
|
||||
os_username: ${{ secrets.OTC_HCDC_USERNAME }}
|
||||
os_password: ${{ secrets.OTC_HCDC_PASSWORD }}
|
||||
os_domain_name: ${{ secrets.OTC_HCDC_DOMAIN_NAME }}
|
||||
os_project_id: ${{ secrets.OTC_HCDC_PROJECT_ID }}
|
||||
@ -1,12 +1,8 @@
|
||||
name: Run HCDC
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize, edited]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
run-hcdc:
|
||||
@ -23,14 +19,6 @@ jobs:
|
||||
persist-credentials: false
|
||||
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)
|
||||
if: ${{ gitea.event.pull_request.head.repo.full_name != gitea.repository }}
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
@ -41,14 +29,6 @@ jobs:
|
||||
persist-credentials: false
|
||||
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
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user