17
17
# /
18
18
19
19
# Workflow name:
20
- name : scaffold_package_via_rfc_issue_comment
20
+ name : scaffold_package
21
21
22
22
# Workflow triggers:
23
23
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
26
37
27
38
# Global permissions:
28
39
permissions :
@@ -41,22 +52,13 @@ jobs:
41
52
42
53
# Define the sequence of job steps...
43
54
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
-
51
55
# Checkout the current branch:
52
56
- name : ' Checkout current branch'
53
57
# Pin action to full length commit SHA
54
58
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
55
- if : ${{ contains(github.event.comment.body, 'scaffold') }}
56
59
57
60
# Run the command to scaffold a package:
58
61
- name : ' Scaffold package'
59
- if : ${{ contains(github.event.comment.body, 'scaffold') }}
60
62
id : scaffold
61
63
# Pin action to full length commit SHA
62
64
uses : stdlib-js/scaffold-pkg-pr-action@882ef0cbb70c1fb76135b9620232606686c1cb10 # v0.0.1
66
68
67
69
# Create a pull request:
68
70
- name : ' Create pull request'
69
- if : ${{ contains(github.event.comment.body, 'scaffold') }}
70
71
# Pin action to full length commit SHA
71
72
uses : peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2
72
73
with :
0 commit comments