Skip to content

Commit ee804b5

Browse files
committed
build: update workflow to prevent accidentally triggering it
1 parent 0145702 commit ee804b5

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

.github/workflows/scaffold_pkg_via_issue_comment.yml renamed to .github/workflows/scaffold_pkg.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,23 @@
1717
#/
1818

1919
# Workflow name:
20-
name: scaffold_package_via_rfc_issue_comment
20+
name: scaffold_package
2121

2222
# Workflow triggers:
2323
on:
24-
issue_comment:
25-
types: [created]
24+
# Allow the workflow to be triggered by other workflows
25+
workflow_call:
26+
# Define the secrets accessible by the workflow:
27+
secrets:
28+
PULL_REQUEST_TOKEN:
29+
description: 'GitHub token for stdlb-bot'
30+
required: true
31+
GITHUB_TOKEN:
32+
description: 'GitHub token used in the scaffold package action'
33+
required: true
34+
OPENAI_API_KEY:
35+
description: 'OpenAI API key for scaffold package action'
36+
required: true
2637

2738
# Global permissions:
2839
permissions:
@@ -41,22 +52,13 @@ jobs:
4152

4253
# Define the sequence of job steps...
4354
steps:
44-
# Exit if comment does not contain scaffolding directive:
45-
- name: 'Exit if comment does not contain scaffolding directive'
46-
if: ${{ !contains(github.event.comment.body, 'scaffold') }}
47-
run: |
48-
echo "Comment does not contain scaffolding directive. Exiting..."
49-
exit 0
50-
5155
# Checkout the current branch:
5256
- name: 'Checkout current branch'
5357
# Pin action to full length commit SHA
5458
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
55-
if: ${{ contains(github.event.comment.body, 'scaffold') }}
5659

5760
# Run the command to scaffold a package:
5861
- name: 'Scaffold package'
59-
if: ${{ contains(github.event.comment.body, 'scaffold') }}
6062
id: scaffold
6163
# Pin action to full length commit SHA
6264
uses: stdlib-js/scaffold-pkg-pr-action@882ef0cbb70c1fb76135b9620232606686c1cb10 # v0.0.1
@@ -66,7 +68,6 @@ jobs:
6668

6769
# Create a pull request:
6870
- name: 'Create pull request'
69-
if: ${{ contains(github.event.comment.body, 'scaffold') }}
7071
# Pin action to full length commit SHA
7172
uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2
7273
with:

0 commit comments

Comments
 (0)