@@ -124,7 +124,25 @@ jobs:
124124 uses : softwaremill/github-actions-workflows/.github/workflows/label.yml@main
125125
126126 auto-merge :
127- # only for PRs by softwaremill-ci
127+ # only for PRs by softwaremill-ci (Scala Steward)
128128 if : github.event.pull_request.user.login == 'softwaremill-ci'
129129 needs : [ verify_unit_tests_lint, verify_integration, verify_docker_image_build, label ]
130130 uses : softwaremill/github-actions-workflows/.github/workflows/auto-merge.yml@main
131+ # `secrets: inherit` (as used in e.g. tapir) won't work here. The reusable workflow
132+ # expects an optional `github-token` secret and falls back to GITHUB_TOKEN when not
133+ # provided. With `secrets: inherit`, `secrets.github-token` resolves to empty (no repo
134+ # secret has that name), falling back to GITHUB_TOKEN — which doesn't trigger downstream
135+ # workflows like deploy (GitHub's anti-recursion policy). The explicit mapping bridges
136+ # the repo secret name (SOFTWAREMILL_CI_PR_TOKEN) to the workflow's expected input.
137+ secrets :
138+ github-token : ${{ secrets.SOFTWAREMILL_CI_PR_TOKEN }}
139+
140+ auto-merge-dependabot :
141+ # Dependabot applies the 'automerge' label at PR creation (via dependabot.yml),
142+ # so unlike softwaremill-ci PRs, there is no need to wait for the label job.
143+ if : github.event.pull_request.user.login == 'dependabot[bot]'
144+ needs : [ verify_unit_tests_lint, verify_integration, verify_docker_image_build ]
145+ uses : softwaremill/github-actions-workflows/.github/workflows/auto-merge.yml@main
146+ # See auto-merge job above for why explicit secret mapping is needed.
147+ secrets :
148+ github-token : ${{ secrets.SOFTWAREMILL_CI_PR_TOKEN }}
0 commit comments