Compare commits

...

2 Commits
hcdc2 ... hcdc3

Author SHA1 Message Date
5e7eccd7d1 Add TOken test workflow 2025-09-25 12:59:26 +00:00
68ad3e5adf fix pull hcdc
Reviewed-by: Tino Schreiber <tino.schreiber@t-systems.com>
Co-authored-by: Sebastian Gode <sebastian.gode@telekom.de>
Co-committed-by: Sebastian Gode <sebastian.gode@telekom.de>
2025-09-25 12:46:00 +00:00
2 changed files with 35 additions and 4 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

@ -9,12 +9,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout PR head
- name: Checkout PR head (same repo)
if: ${{ gitea.event.pull_request.head.repo.full_name == gitea.repository }}
uses: https://github.com/actions/checkout@v4
with:
repository: ${{ gitea.event.pull_request.head.repo.full_name }}
repository: ${{ gitea.repository }}
ref: ${{ gitea.event.pull_request.head.ref }}
fetch-depth: 0
persist-credentials: false
token: ${{ gitea.token }}
- 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
with:
repository: ${{ gitea.repository }}
ref: refs/pull/${{ gitea.event.pull_request.number }}/head
fetch-depth: 0
persist-credentials: false
token: ${{ gitea.token }}
- name: Checkout base
@ -24,9 +36,9 @@ jobs:
ref: ${{ gitea.event.pull_request.base.ref }}
path: base
fetch-depth: 0
persist-credentials: false
token: ${{ gitea.token }}
- name: Get OTC token
id: otc
uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/get-otc-token@v1
@ -46,7 +58,7 @@ jobs:
python-version: "3.12"
- name: Comment in case there's an error
if: failure()
if: ${{ failure() && steps.hcdc.outcome == 'failure' }}
env:
GITEA_URL: ${{ gitea.server_url }}
REPO: ${{ gitea.repository }}