Skip to content

Commit

Permalink
feat(github-actions): Enhance add-to-project workflow with pull reque…
Browse files Browse the repository at this point in the history
…st support and token generation (#412)
  • Loading branch information
zoltanbedi authored Jan 27, 2025
1 parent b603a8b commit ae63ce7
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,33 @@ on:
issues:
types:
- opened
pull_request:
types:
- opened

permissions:
contents: read
id-token: write

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- id: get-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@main
with:
repo_secrets: |
GITHUB_APP_ID=grafana-oss-big-tent:app-id
GITHUB_APP_PRIVATE_KEY=grafana-oss-big-tent:private-key
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ env.GITHUB_APP_ID }}
private-key: ${{ env.GITHUB_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/grafana/projects/457
github-token: ${{ secrets.ISSUE_COMMANDS_TOKEN }}
github-token: ${{ steps.generate-token.outputs.token }}

0 comments on commit ae63ce7

Please sign in to comment.