diff --git a/.github/workflows/__generate-dependabot-config.yml b/.github/workflows/__generate-dependabot-config.yml index a066883..f3141ff 100644 --- a/.github/workflows/__generate-dependabot-config.yml +++ b/.github/workflows/__generate-dependabot-config.yml @@ -7,3 +7,5 @@ on: jobs: main: uses: ./.github/workflows/generate-dependabot-config.yml + secrets: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate-dependabot-config.md b/.github/workflows/generate-dependabot-config.md index fc9d3d8..0d56a9e 100644 --- a/.github/workflows/generate-dependabot-config.md +++ b/.github/workflows/generate-dependabot-config.md @@ -23,10 +23,20 @@ on: jobs: main: uses: hoverkraft-tech/ci-github-common/.github/workflows/generate-dependabot-config.yml@0.3.4 + secrets: + # GitHub token for creating and merging pull request (permissions contents: write and pull-requests: write). + # Can be passed in using "secrets.GITHUB_TOKEN". + # See https://github.com/hoverkraft-tech/ci-github-common/blob/main/actions/create-and-merge-pull-request + github-token: ${{ secrets.GITHUB_TOKEN }} ``` + +| **Secret** | **Description** | +| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| **github-token** | GitHub token for creating and merging pull request (permissions contents: write and pull-requests: write). Can be passed in using "secrets.GITHUB_TOKEN". See [https://github.com/hoverkraft-tech/ci-github-common/blob/main/actions/create-and-merge-pull-request](https://github.com/hoverkraft-tech/ci-github-common/blob/main/actions/create-and-merge-pull-request) | + diff --git a/.github/workflows/generate-dependabot-config.yml b/.github/workflows/generate-dependabot-config.yml index fc685ed..fa6ece7 100644 --- a/.github/workflows/generate-dependabot-config.yml +++ b/.github/workflows/generate-dependabot-config.yml @@ -6,6 +6,10 @@ on: workflow_call: + secrets: + github-token: + description: 'GitHub token for creating and merging pull request (permissions contents: write and pull-requests: write). Can be passed in using "secrets.GITHUB_TOKEN". See https://github.com/hoverkraft-tech/ci-github-common/blob/main/actions/create-and-merge-pull-request' + required: true jobs: main: diff --git a/actions/create-and-merge-pull-request/action.yml b/actions/create-and-merge-pull-request/action.yml index ed6e7c6..8d38f20 100644 --- a/actions/create-and-merge-pull-request/action.yml +++ b/actions/create-and-merge-pull-request/action.yml @@ -32,6 +32,11 @@ runs: - id: github-actions-bot-user uses: ./self-actions/get-github-actions-bot-user + - shell: bash + # FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684 + run: | + rm -fr ./self-actions + - uses: peter-evans/create-pull-request@v4.2.4 id: create-pull-request with: diff --git a/actions/create-or-update-comment/action.yml b/actions/create-or-update-comment/action.yml index 9633f95..6cefffc 100644 --- a/actions/create-or-update-comment/action.yml +++ b/actions/create-or-update-comment/action.yml @@ -30,6 +30,11 @@ runs: - id: github-actions-bot-user uses: ./self-actions/get-github-actions-bot-user + - shell: bash + # FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684 + run: | + rm -fr ./self-actions + - uses: peter-evans/find-comment@v2 id: find-comment with: