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:
|
||||
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 }}
|
||||
|
||||
Reference in New Issue
Block a user