Skip to content

Commit

Permalink
Testing some stuff
Browse files Browse the repository at this point in the history
Signed-off-by: Simo Sorce <[email protected]>
  • Loading branch information
simo5 committed Jun 4, 2024
1 parent 23de726 commit 8571555
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
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(github.event.pull_request.labels.*.name, 'no-covscan') }}
name: Fail Again
runs-on: ubuntu-latest
steps:
- name: Fail Step
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
false
delabel:
if: ${{ contains(github.event.action, 'synchronize') && contains(github.event.pull_request.labels.*.name, 'covscan-ok') }}
name: Fail on changed files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check changed files
id: changed-sources
uses: tj-actions/changed-files@v44
with:
files: |
src/**
- name: Fail on changed files
if: steps.changed-sources.outputs.any_changed == 'true'
run: |
false
- name: Fail Step
env:
CONTEXT: ${{ toJson(steps.changed-sources.outputs) }}
run: |
echo "$CONTEXT"
false

0 comments on commit 8571555

Please sign in to comment.