diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..72b9c42e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,34 @@ +--- +name: Faux Scan + +on: + pull_request: + branches: ["main"] + types: + - synchronize + - labeled + +jobs: + on-labeled-pr: + if: ${{ contains(github.event.action, 'labeled') && contains(github.event.*.labels.*.name, 'covscan-ok') }} + name: Fail PR + runs-on: ubuntu-latest + steps: + - name: Fail Step + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: | + echo "$GITHUB_CONTEXT" + false + + on-synchronize: + if: ${{ contains(github.event.action, 'synchronize') && contains('no-covscan', github.event.pull_request.labels.*.name) }} + name: Fail Again + runs-on: ubuntu-latest + steps: + - name: Fail Step + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: | + echo "$GITHUB_CONTEXT" + false