name: Interaction Limits

on:
  schedule:
    - cron: '0 0 1 * *'

jobs:
  update-limits:
    name: Update interaction limits
    runs-on: ubuntu-latest
    steps:
      - name: Run GitHub script
        uses: actions/github-script@v3
        with:
          github-token: ${{ secrets.GH_TOKEN }}
          script: |
            await github.interactions.removeRestrictionsForRepo({
              owner: context.repo.owner,
              repo: context.repo.repo,
            })
            await github.interactions.setRestrictionsForRepo({
              owner: context.repo.owner,
              repo: context.repo.repo,
              limit: 'collaborators_only',
              expiry: 'one_month',
            })

name: Interaction Limits

on:
  schedule:
    - cron: '0 0 1 * *'

jobs:
  update-limits:
    name: Update interaction limits
    runs-on: ubuntu-latest
    steps:
      - name: Run GitHub script
        uses: actions/github-script@v3
        with:
          script: |
            await github.interactions.removeRestrictionsForRepo({
              owner: context.repo.owner,
              repo: context.repo.repo,
            })
            await github.interactions.setRestrictionsForRepo({
              owner: context.repo.owner,
              repo: context.repo.repo,
              limit: 'collaborators_only',
              expiry: 'one_month',
            })

Use default GitHub token in workflow
actions: Use default GitHub token in workflow
