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

Replace github_token input with secret #120

Merged
merged 1 commit into from
May 15, 2024
Merged
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
16 changes: 8 additions & 8 deletions .github/workflows/update-trending-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Update epic trending field

on:
workflow_call:
secrets:
GITHUB_TOKEN:
description: GitHub Token
required: true
inputs:
project_owner:
description: GitHub Project Owner
Expand All @@ -15,10 +19,6 @@ on:
description: GitHub Project Field Name
type: string
default: 'Trending'
github_token:
description: GitHub Token
type: string
required: true

jobs:
extract-trend:
Expand All @@ -39,7 +39,7 @@ jobs:
uses: actions/github-script@v7
if: ${{ steps.extract-trend.outputs.group1 != '' }}
with:
github-token: ${{ inputs.github_token }}
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const variables = {
trend: `${{ steps.extract-trend.outputs.group1 }}`.trim(),
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
uses: monry/actions-get-project-id@v2
with:
# Personal Access Token that with `org:read` are granted.
github-token: ${{ inputs.github_token }}
github-token: ${{ secrets.GITHUB_TOKEN }}

# Owner name of project
project-owner: ${{ inputs.project_owner }}
Expand All @@ -108,13 +108,13 @@ jobs:
uses: monry/actions-get-project-item-id@v2
with:
# Personal Access Token that with `repo` and `org:read` are granted.
github-token: ${{ inputs.github_token }}
github-token: ${{ secrets.GITHUB_TOKEN }}
project-id: ${{ steps.get-project-id.outputs.project-id }}
issue-id: ${{ github.event.issue.node_id }}
- uses: titoportas/update-project-fields@v0.1.0
with:
project-url: https://github.com/orgs/grafana/projects/${{ inputs.project_number }}
github-token: ${{ inputs.github_token }}
github-token: ${{ secrets.GITHUB_TOKEN }}
item-id: ${{ steps.get-item-id.outputs.project-item-id }}
field-keys: Trending
field-values: ${{ needs.extract-trend.outputs.trend_id }}
Expand Down
Loading