Skip to content

Commit

Permalink
fix: pass github token to generate dependabot config workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
neilime committed Mar 25, 2023
1 parent 8b52e15 commit 92cf420
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/__generate-dependabot-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ on:
jobs:
main:
uses: ./.github/workflows/generate-dependabot-config.yml
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions .github/workflows/generate-dependabot-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
```
<!-- end usage -->
<!-- start secrets -->
| **Secret** | **Description** |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **<code>github-token</code>** | 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) |
<!-- end secrets -->
<!-- start inputs -->
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/generate-dependabot-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions actions/create-and-merge-pull-request/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions actions/create-or-update-comment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 92cf420

Please sign in to comment.