Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci/only cancel on main #19

Merged
merged 5 commits into from
Feb 23, 2024
Merged
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
28 changes: 24 additions & 4 deletions .github/workflows/waste_time.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
on:
pull_request:
types: [opened, edited, synchronize, reopened]
push:
branches:
- main
- ci/**


concurrency:
# Don't cancel on main
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request_number || github.ref }}
cancel-in-progress: true


# For Draft PRs, we only want the herpaderp step 1
# For Non-Draft PRs, we want all the steps
jobs:
show-variables:
runs-on: ubuntu-latest
name: "Show variables"
steps:
- name: "The actual showing of variables"
run: |
echo Workflow is .${{ github.workflow }}.
echo Ref is .${{ github.ref }}.
echo Run ID is .${{ github.run_id }}.
echo PR number is .${{ github.event.pull_request_number }}
mootrix:
runs-on: ${{ matrix.os }}
name: Mootrix ${{ matrix.os }} - ${{ matrix.config.moo }}
Expand All @@ -25,12 +45,12 @@ jobs:
if: ${{ github.event.pull_request.draft == true && matrix.config.moo == 'herpaderp' }}
run: |
echo "Doing the thing"
sleep 5
sleep 20
echo "The thing is done"
- name: Always run
run: |
echo "This thing always happens"
sleep 5
sleep 20
echo "And has now been concluded"

meowtrix:
Expand All @@ -52,10 +72,10 @@ jobs:
- name: First step
run: |
echo "Doing the thing"
sleep 5
sleep 20
echo "The thing is done"
- name: Second step
run: |
echo "Doing the other thing"
sleep 5
sleep 20
echo "The other thing is also done"
2 changes: 2 additions & 0 deletions modification.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
9cb27066-8e61-4246-b214-1ecb476774b1
another mod