Skip to content
Merged

aa #17

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/build_commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: PR 15-Min Build Pass Job

on:
pull_request:
branches:
- main # or your default target branch
types: [opened, synchronize, reopened]

jobs:
run-if-branch-has-build:
if: contains(github.head_ref, 'build')
runs-on: ubuntu-latest
steps:
- name: Sleep for 15 minutes
run: sleep 900 # 900 seconds = 15 minutes

- name: Done
run: echo "✅ Job passed after 15 minutes on branch '${{ github.head_ref }}'"
20 changes: 20 additions & 0 deletions .github/workflows/fail_commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PR 5-Min Fail Job for 'fail' Commits

on:
pull_request:
branches:
- main # or your default target branch
types: [opened, synchronize, reopened]

jobs:
run-if-commit-has-fail:
if: contains(github.event.pull_request.head.commit.message, 'fail')
runs-on: ubuntu-latest
steps:
- name: Sleep for 5 minutes
run: sleep 300

- name: Fail on purpose
run: |
echo "❌ Failing the job after 5 minutes due to commit: '${{ github.event.pull_request.head.commit.message }}'"
exit 1
8 changes: 4 additions & 4 deletions .github/workflows/pass.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PR 5-Min Pass Job for 'pass' Commits
name: PR 5-Min Pass Job for 'pass' Branches

on:
pull_request:
Expand All @@ -7,12 +7,12 @@ on:
types: [opened, synchronize, reopened]

jobs:
run-if-commit-has-pass:
run-if-branch-has-pass:
if: contains(github.head_ref, 'pass')
runs-on: ubuntu-latest
if: contains(github.event.pull_request.head.commit.message, 'pass')
steps:
- name: Sleep for 5 minutes
run: sleep 300

- name: Done
run: echo "✅ Passed after 5 minutes due to commit: ${{ github.event.pull_request.head.commit.message }}"
run: echo "✅ Passed after 5 minutes for branch '${{ github.head_ref }}'"
18 changes: 18 additions & 0 deletions .github/workflows/pass_commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: PR 5-Min Pass Job for 'pass' Commits

on:
pull_request:
branches:
- main # or your default branch
types: [opened, synchronize, reopened]

jobs:
run-if-commit-has-pass:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.head.commit.message, 'pass')
steps:
- name: Sleep for 5 minutes
run: sleep 300

- name: Done
run: echo "✅ Passed after 5 minutes due to commit: ${{ github.event.pull_request.head.commit.message }}"