Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pass github token to generate dependabot config workflow #40

Merged
merged 1 commit into from
Mar 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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