Skip to content

Trigger the opening of a PR to advance an RFC to the next stage #27

Trigger the opening of a PR to advance an RFC to the next stage

Trigger the opening of a PR to advance an RFC to the next stage #27

name: Trigger the opening of a PR to advance an RFC to the next stage
on:
workflow_dispatch:
inputs:
rfc-path:
type: string
required: true
description: Path to the RFC to open PR for advancement to the next stage
jobs:
gather-rfc-info:
name: 'Gather RFC info'
runs-on: ubuntu-latest
outputs:
new-stage: ${{ steps.new-stage.outputs.value }}
rfc-number: ${{ steps.rfc.outputs.rfc-number }}
steps:
- uses: actions/checkout@v3
- name: Setup RFCs tooling
uses: ./.github/actions/setup-rfcs-tooling
- name: Find RFC Number
id: rfc
run: |
rfc=${{ inputs.rfc-path }}
rfc_number="${rfc//[!0-9]/}"
echo "RFC Number: $rfc_number"
echo "rfc-number=$rfc_number" >> $GITHUB_OUTPUT
- name: Find new stage
id: new-stage
run: |
new_stage=`node rfcs-tooling/scripts/find-next-stage.mjs ${{ inputs.rfc-path }}`
echo "New Stage: $new_stage"
echo "value=$new_stage" >> $GITHUB_OUTPUT
advance-rfc:
uses: ./.github/workflows/open-advancement-pr.yml
needs: [ gather-rfc-info ]
if: needs.gather-rfc-info.outputs.new-stage
with:
rfc-path: ${{ inputs.rfc-path }}
rfc-number: ${{ needs.gather-rfc-info.outputs.rfc-number }}
new-stage: ${{ needs.gather-rfc-info.outputs.new-stage }}
secrets:
personal-access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}