mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-20 23:04:22 +01:00
Otherwise we'll get the following error from the workflow: ``` The workflow is not valid. .github/workflows/ci-on-push.yaml (Line: 24, Col: 20): Unrecognized named-value: 'env'. Located at position 1 within expression: env.COMMIT_HASH .github/workflows/ci-on-push.yaml (Line: 25, Col: 18): Unrecognized named-value: 'env'. Located at position 1 within expression: env.PR_NUMBER ``` Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
27 lines
862 B
YAML
27 lines
862 B
YAML
name: Kata Containers CI
|
|
on:
|
|
pull_request_target:
|
|
branches:
|
|
- 'main'
|
|
types:
|
|
# Adding 'labeled' to the list of activity types that trigger this event
|
|
# (default: opened, synchronize, reopened) so that we can run this
|
|
# workflow when the 'ok-to-test' label is added.
|
|
# Reference: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
- labeled
|
|
env:
|
|
COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
|
|
PR_NUMBER: ${{ github.event.pull_requesst.number }}
|
|
|
|
jobs:
|
|
kata-containers-ci-on-push:
|
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}
|
|
uses: ./.github/workflows/ci.yaml
|
|
with:
|
|
commit-hash: $COMMIT_HASH
|
|
pr-number: $PR_NUMBER
|
|
tag: $PR_NUMBER-$COMMIT_HASH
|