chore: change to relative require path and fix code style #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/ | ||
# @license Apache-2.0 | ||
# | ||
# Copyright (c) 2022 The Stdlib Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
#/ | ||
# Workflow name: | ||
name: scaffold_package | ||
# Workflow triggers: | ||
on: | ||
# 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' | ||
required: true | ||
GITHUB_TOKEN: | ||
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: | ||
# Allow read-only access to the repository contents: | ||
contents: read | ||
# Workflow jobs: | ||
jobs: | ||
scaffold: | ||
# Define a display name: | ||
name: 'Scaffold Package via RFC Issue Comment' | ||
# Define the type of virtual host machine on which to run the job: | ||
runs-on: ubuntu-latest | ||
# Define the sequence of job steps... | ||
steps: | ||
# Checkout the current branch: | ||
- name: 'Checkout current branch' | ||
# Pin action to full length commit SHA | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
# Run the command to scaffold a package: | ||
- name: 'Scaffold package' | ||
id: scaffold | ||
# Pin action to full length commit SHA | ||
uses: stdlib-js/scaffold-pkg-pr-action@882ef0cbb70c1fb76135b9620232606686c1cb10 # v0.0.1 | ||
with: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Create a pull request: | ||
- name: 'Create pull request' | ||
# Pin action to full length commit SHA | ||
uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2 | ||
with: | ||
token: ${{ secrets.PULL_REQUEST_TOKEN }} | ||
commit-message: 'feat: add `${{ steps.scaffold.outputs.alias }}`' | ||
title: 'feat: add `${{ steps.scaffold.outputs.alias }}` package' | ||
body: | | ||
This PR adds the [${{ steps.scaffold.outputs.alias }}](../tree/${{ steps.scaffold.outputs.path }}/${{ steps.scaffold.outputs.dir }}) package. | ||
## Notes | ||
* :warning: The package was scaffolded using the stdlib bot, which uses AI to generate package content. The generated content is not guaranteed to be correct, and will require manual review and editing. :warning: | ||
branch: ${{ steps.scaffold.outputs.path }} |