Merge pull request #1955 from grafana/add-to-projects-fix
Enhance GitHub Actions workflow: Add pull request trigger and secret management for project integration
This commit is contained in:
23
.github/workflows/add-to-project.yml
vendored
23
.github/workflows/add-to-project.yml
vendored
@@ -3,12 +3,33 @@ on:
|
|||||||
issues:
|
issues:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
add-to-project:
|
add-to-project:
|
||||||
name: Add issue to project
|
name: Add issue to project
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
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
|
- uses: actions/add-to-project@main
|
||||||
with:
|
with:
|
||||||
project-url: https://github.com/orgs/grafana/projects/457
|
project-url: https://github.com/orgs/grafana/projects/457
|
||||||
github-token: ${{ secrets.ISSUE_COMMANDS_TOKEN }}
|
github-token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
|||||||
Reference in New Issue
Block a user