diff --git a/.github/workflows/send_payload_to_pytest.yml b/.github/workflows/send_payload_to_pytest.yml index e31a126..a1c8939 100644 --- a/.github/workflows/send_payload_to_pytest.yml +++ b/.github/workflows/send_payload_to_pytest.yml @@ -4,11 +4,20 @@ on: push: branches: - 'main' + paths: + - 'repo_dispatch_event_sender/**' + - 'tests/**' + - 'poetry.lock' jobs: test-and-send-dispatch: if: github.actor != 'dependabot[bot]' && !startsWith(github.event.head_commit.message, 'Bump version') && !startsWith(github.event.head_commit.message, '[skip ci]') runs-on: ubuntu-latest + permissions: + # Enable code checkout + contents: write + # Enable repository_dispatch triggers + actions: write steps: - name: Checkout code uses: actions/checkout@v4.2.2 diff --git a/.github/workflows/update-requirements-after-dependabot.yml b/.github/workflows/update-requirements-after-dependabot.yml index 8117df9..b69c9bb 100644 --- a/.github/workflows/update-requirements-after-dependabot.yml +++ b/.github/workflows/update-requirements-after-dependabot.yml @@ -16,11 +16,16 @@ jobs: update-requirements: if: github.event.pull_request.merged == true && github.event.pull_request.user.login == 'dependabot[bot]' runs-on: ubuntu-latest + permissions: + # Enable file clone, commit, and push + contents: write + # Enable reading of pull request information + pull-requests: read steps: - uses: actions/checkout@v4.2.2 with: fetch-depth: 0 - token: ${{ secrets.PAT_FOR_PUSHES }} + token: ${{ secrets.GITHUB_TOKEN }} - name: Set up Python uses: actions/setup-python@v5.3.0 with: @@ -35,8 +40,8 @@ jobs: poetry export -f requirements.txt -o requirements-dev.txt --without-hashes --with dev - name: Commit and push changes run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" + git config --local user.email "33836132+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" git add requirements.txt requirements-dev.txt git commit -m ":wrench:Update requirements files after dependency update [skip ci]" || echo "No changes to commit" git push diff --git a/.github/workflows/update_pre-commit_hooks.yml b/.github/workflows/update_pre-commit_hooks.yml index 0ec8899..1a0c814 100644 --- a/.github/workflows/update_pre-commit_hooks.yml +++ b/.github/workflows/update_pre-commit_hooks.yml @@ -8,11 +8,14 @@ on: jobs: update: runs-on: ubuntu-latest + permissions: + # Enable file changes, commits, and pushes + contents: write steps: - uses: actions/checkout@v4.2.2 with: fetch-depth: 0 - token: ${{ secrets.PAT_FOR_PUSHES }} + token: ${{ secrets.GITHUB_TOKEN }} - name: Set up Python uses: actions/setup-python@v5.3.0 with: