Try workflow call #87
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## @file | |
# Run PatchCheck on all commits in a pull request | |
# | |
# Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> | |
# SPDX-License-Identifier: BSD-2-Clause-Patent | |
## | |
name: PatchCheck | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | |
branches: | |
- CiEnabled | |
jobs: | |
evaluate: | |
name: Evaluate Pull Request Event | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
outputs: | |
SkipPatchCheck: ${{ steps.skip.outputs.SkipPatchCheck }} | |
PatchCheckOptions: ${{ steps.options.outputs.PatchCheckOptions }} | |
steps: | |
- name: IsLabel | |
id: skip | |
if: ${{ contains(fromJSON('["labeled", "unlabeled"]'), github.event.action) && (github.event.label.name != 'ignore-multi-package') }} | |
run: echo "SkipPatchCheck=true" >> $GITHUB_OUTPUT | |
- name: IsIgnoreMultiPackage | |
id: options | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'ignore-multi-package')}} | |
run: echo "PatchCheckOptions=--ignore-multi-package" >> $GITHUB_OUTPUT | |
patchcheck: | |
name: PatchCheck | |
needs: evaluate | |
if: needs.evaluate.outputs.SkipPatchCheck != 'true' | |
uses: ./.github/workflows/patchcheck_call.yml | |
with: | |
PatchCheckOptions: ${{ needs.evaluate.outputs.PatchCheckOptions }} |