Skip to content
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
7 changes: 6 additions & 1 deletion .github/workflows/1-1-debug-message.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Print debug Step 1
run: echo "Runner Debug Enabled => ${{ runner.debug }}" #RUNNER_DEBUG
run: |
if [ "$ACTIONS_STEP_DEBUG" = "true" ]; then
echo "Runner Debug Enabled"
else
echo "Runner Debug Disabled"
fi

- name: Print debug Step 2
run: |
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/13-0-concurrency.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Cancel_InProgress
run-name: Cancel In Progress Workflow
description: "This workflow cancels in-progress jobs when a new run is triggered."

on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
cancel_in_progress_job:
runs-on: ubuntu-latest
steps:
- name: Cancel In Progress Jobs
run: echo "This job will cancel in-progress jobs for the same workflow and branch."



13 changes: 13 additions & 0 deletions .github/workflows/13-1-jobs-concurrency.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Cancel_InProgress_Jobs
run-name: Cancel In Progress Jobs
description: "This workflow cancels in-progress jobs when a new run is triggered."

on:
workflow_dispatch:

jobs:
cancel_in_progress_job:
runs-on: ubuntu-latest
concurrency:
group: example-group
cancel-in-progress: true
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@

[![Fail_Job_By_Non_Zero](https://github.com/Albejr/github-workflow-learn/actions/workflows/11-0-action-fail.yaml/badge.svg?branch=main)](https://github.com/Albejr/github-workflow-learn/actions/workflows/11-0-action-fail.yaml)

[![Using_Matrix](https://github.com/Albejr/github-workflow-learn/actions/workflows/12-0-matrix.yaml/badge.svg?branch=main)](https://github.com/Albejr/github-workflow-learn/actions/workflows/12-0-matrix.yaml)
[![Using_Matrix](https://github.com/Albejr/github-workflow-learn/actions/workflows/12-0-matrix.yaml/badge.svg?branch=main)](https://github.com/Albejr/github-workflow-learn/actions/workflows/12-0-matrix.yaml)

[![Cancel_InProgress](https://github.com/Albejr/github-workflow-learn/actions/workflows/13-0-concurrency.yaml/badge.svg?branch=main)](https://github.com/Albejr/github-workflow-learn/actions/workflows/13-0-concurrency.yaml)

[![Cancel_InProgress_Jobs](https://github.com/Albejr/github-workflow-learn/actions/workflows/13-1-jobs-concurrency.yaml/badge.svg?branch=main)](https://github.com/Albejr/github-workflow-learn/actions/workflows/13-1-jobs-concurrency.yaml)