Skip to content

Latest commit

 

History

History
19 lines (17 loc) · 594 Bytes

github_token-input-example.md

File metadata and controls

19 lines (17 loc) · 594 Bytes

This example workflow uses the GitHub CLI, which requires the GITHUB_TOKEN as the value for the GH_TOKEN input parameter:

name: Open new issue
on: workflow_dispatch

jobs:
  open-issue:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      issues: write
    steps:
      - run: |
          gh issue --repo {% raw %}${{ github.repository }}{% endraw %} \
            create --title "Issue title" --body "Issue body"
        env:
          GH_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}