# Workflow from https://github.com/mitchellh/vouch/tree/main/action/manage-by-discussion
on:
  discussion_comment:
    types: [created]

# Serialize updates to the VOUCHED file.
concurrency:
  group: vouch-manage
  cancel-in-progress: false

permissions:
  contents: write
  discussions: write

jobs:
  manage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: mitchellh/vouch/action/manage-by-discussion@v1
        with:
          discussion-number: ${{ github.event.discussion.number }}
          comment-node-id: ${{ github.event.comment.node_id }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
