Compare commits

..

1 Commits
hcdc5 ... hcdc3

Author SHA1 Message Date
5e7eccd7d1 Add TOken test workflow 2025-09-25 12:59:26 +00:00
2 changed files with 20 additions and 21 deletions

View 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 }}

View File

@ -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: