Skip to content

Commit

Permalink
Merge pull request #24 from os-autoinst/osukup/ci
Browse files Browse the repository at this point in the history
Update openqa.yaml to use correct repo + ref and run on pull_request_target
  • Loading branch information
mimi1vx authored Jun 13, 2023
2 parents cceb506 + 23063f3 commit 8628865
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/openqa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
name: openQA - GitHub action example
# yamllint disable-line rule:truthy
on:
# triggering on PRs is disabled here in favor of using the webhook-based approach
#pull_request:
pull_request_target:
# Note how this runs on:pull_request_target and not on:pull_request!
# The difference is that this runs always with the context of the master
# branch. This is necessary to allow accessing the API credential secrets.
workflow_dispatch:
env:
OPENQA_HOST: ${{ secrets.OPENQA_URL }}
OPENQA_API_KEY: ${{ secrets.OPENQA_API_KEY }}
OPENQA_API_SECRET: ${{ secrets.OPENQA_API_SECRET }}
GH_REPO: ${github.event.pull_request.head.repo.full_name}}
GH_REF: ${{github.event.pull_request.head.ref}}

jobs:
trigger_and_monitor_openqa:
Expand All @@ -25,6 +29,6 @@ jobs:
--apikey "$OPENQA_API_KEY" --apisecret "$OPENQA_API_SECRET" \
--param-file SCENARIO_DEFINITIONS_YAML=scenario-definitions.yaml \
DISTRI=example VERSION=0 FLAVOR=DVD ARCH=x86_64 TEST=simple_boot \
BUILD="$GITHUB_REPOSITORY.git#$GITHUB_REF" _GROUP_ID="0" \
CASEDIR="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git#$GITHUB_REF" \
BUILD="$GH_REPO.git#$GH_REF" _GROUP_ID="0" \
CASEDIR="$GITHUB_SERVER_URL/$GH_REPO.git#$GH_REF" \
NEEDLES_DIR="%%CASEDIR%%/needles"

0 comments on commit 8628865

Please sign in to comment.