Skip to content

Instance: Workflow Sandbox #5

Instance: Workflow Sandbox

Instance: Workflow Sandbox #5

name: "Instance Request Labeler"
on:
issues:
types:
- reopened
- opened
permissions:
issues: write
contents: read
jobs:
labeler:
runs-on: ubuntu-latest
#if: contains(github.event.pull_request.labels.*.name, 'instance:requested')
steps:
- name: Issue Forms Body Parser
id: parse
uses: zentered/[email protected]
- name: Extract issue fields
id: extract
run: |
instance_flavor = $(echo ${{ toJSON(steps.parse.outputs.data) }} | \
jq '.instance-flavor.text')
echo "instance_flavor [$instance_flavor]"
echo "instance_flavor=$instance_flavor" >> $GITHUB_OUTPUT
- name: Add flavor label
run: gh issue edit "$NUMBER" --add-label "$LABELS"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
LABELS: flavor:${{ steps.extract.outputs.instance_flavor }}