Skip to content

Commit 03e29bd

Browse files
committed
Ensure workflows are not triggered by automated pull requests
1 parent dd216e9 commit 03e29bd

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/markdown_tocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ jobs:
3939
# Define a display name:
4040
name: 'Update namespace ToCs'
4141

42-
# Only run this job if the pull request was merged (or the job was triggered manually):
43-
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
42+
# Only run this job if the pull request was merged and did not have label `automated-pr` (or the job was triggered manually):
43+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'automated-pr') == false || github.event_name == 'workflow_dispatch'
4444

4545
# Define the type of virtual host machine:
4646
runs-on: ubuntu-latest

.github/workflows/namespace_declarations.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ jobs:
4242
# Define a display name:
4343
name: 'Update TypeScript Declarations'
4444

45-
# Only run this job if the pull request was merged (or the job was triggered manually):
46-
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
45+
# Only run this job if the pull request was merged and did not have label `automated-pr` (or the job was triggered manually):
46+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'automated-pr') == false || github.event_name == 'workflow_dispatch'
4747

4848
# Define the type of virtual host machine:
4949
runs-on: ubuntu-latest

.github/workflows/namespace_exports.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ jobs:
3939
# Define a display name:
4040
name: 'Update Namespace Exports'
4141

42-
# Only run this job if the pull request was merged (or the job was triggered manually):
43-
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
42+
# Only run this job if the pull request was merged and did not have label `automated-pr` (or the job was triggered manually):
43+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'automated-pr') == false || github.event_name == 'workflow_dispatch'
4444

4545
# Define the type of virtual host machine:
4646
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)