Skip to content

Commit

Permalink
build: update workflow to prevent accidentally triggering it
Browse files Browse the repository at this point in the history
  • Loading branch information
Planeshifter committed Apr 13, 2024
1 parent 0145702 commit ee804b5
Showing 1 changed file with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,23 @@
#/

# Workflow name:
name: scaffold_package_via_rfc_issue_comment
name: scaffold_package

# Workflow triggers:
on:
issue_comment:
types: [created]
# Allow the workflow to be triggered by other workflows
workflow_call:
# Define the secrets accessible by the workflow:
secrets:
PULL_REQUEST_TOKEN:
description: 'GitHub token for stdlb-bot'

This comment has been minimized.

Copy link
@kgryte

kgryte Apr 14, 2024

Member

Typo. stdlib-bot

required: true
GITHUB_TOKEN:

This comment has been minimized.

Copy link
@kgryte

kgryte Apr 14, 2024

Member

This is triggering a lint error.

description: 'GitHub token used in the scaffold package action'
required: true
OPENAI_API_KEY:
description: 'OpenAI API key for scaffold package action'
required: true

# Global permissions:
permissions:
Expand All @@ -41,22 +52,13 @@ jobs:

# Define the sequence of job steps...
steps:
# Exit if comment does not contain scaffolding directive:
- name: 'Exit if comment does not contain scaffolding directive'
if: ${{ !contains(github.event.comment.body, 'scaffold') }}
run: |
echo "Comment does not contain scaffolding directive. Exiting..."
exit 0
# Checkout the current branch:
- name: 'Checkout current branch'
# Pin action to full length commit SHA
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: ${{ contains(github.event.comment.body, 'scaffold') }}

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

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

0 comments on commit ee804b5

Please sign in to comment.