Revert "Add a generic label check step"
This reverts commit 6d5dacdd96.
This commit is contained in:
parent
f1190d2f79
commit
0b1bcf2bef
29
.github/workflows/pr-automation.yml
vendored
29
.github/workflows/pr-automation.yml
vendored
|
|
@ -5,34 +5,13 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- release
|
- release
|
||||||
- pg
|
- pg
|
||||||
types: [ labeled, synchronize ]
|
types:
|
||||||
|
- labeled
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-label:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Check PR Label
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
# This script will check if the PR has ok-to-test label.
|
|
||||||
# To avoid being dependent on the event which triggered this workflow,
|
|
||||||
# we will always get the pull request labels directly from the context
|
|
||||||
# It will later set the output to be "true" or "false".
|
|
||||||
script: |
|
|
||||||
const labels = context.payload.pull_request.labels.map(label => label.name);
|
|
||||||
if (labels.includes("ok-to-test")) {
|
|
||||||
console.log("Label 'ok-to-test' is present");
|
|
||||||
core.setOutput("ok_to_test", "true");
|
|
||||||
} else {
|
|
||||||
console.log("Label 'ok-to-test' is not present");
|
|
||||||
core.setOutput("ok_to_test", "false");
|
|
||||||
parse-tags:
|
parse-tags:
|
||||||
needs: [ check-label ]
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: steps.check-label.outputs.ok_to_test == 'true'
|
if: github.event.label.name == 'ok-to-test'
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
defaults:
|
defaults:
|
||||||
|
|
@ -93,7 +72,7 @@ jobs:
|
||||||
|
|
||||||
# Call the workflow to run Cypress tests
|
# Call the workflow to run Cypress tests
|
||||||
perform-test:
|
perform-test:
|
||||||
needs: [ parse-tags ]
|
needs: [parse-tags]
|
||||||
if: success()
|
if: success()
|
||||||
uses: ./.github/workflows/pr-cypress.yml
|
uses: ./.github/workflows/pr-cypress.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user