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

remove secrets from trigger-prow-build-job-reusable #71

Merged
merged 1 commit into from
Feb 7, 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
12 changes: 3 additions & 9 deletions .github/workflows/trigger-prow-build-job-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ on:
required: true
type: string
description: The context is the name of the prow job we are waiting for.
secrets:
BOT_PAT:
required: true
GH_TOKEN:
required: true

jobs:
trigger-prow-build-job:
Expand All @@ -40,18 +35,17 @@ jobs:
- name: Set up git
if: ${{ env.CREATE_PR == 'true' }}
env:
GH_TOKEN: ${{ secrets.BOT_PAT }}
REPO: ${{ github.repository }}
shell: bash
run: |
# set git username
ghusername=$(curl -s -H "Authorization: token ${GH_TOKEN}" https://api.github.com/user | jq '.login')
ghusername=$(curl -s -H "Authorization: token ${{ secrets.BOT_PAT }}" https://api.github.com/user | jq '.login')
git config user.name "${ghusername}"
# set git mail address
ghemailaddress="${ghusername}@users.noreply.github.com"
git config user.email "${ghemailaddress}"
# set remote url
git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${REPO}.git"
git remote set-url origin "https://x-access-token:${{ secrets.BOT_PAT }}@github.com/${REPO}.git"

- name: Push git tag to trigger the prow build job
run: |
Expand All @@ -62,7 +56,7 @@ jobs:
id: wait-build
uses: kyma-project/wait-for-commit-status-action@2b3ffe09af8b6f40e1213d5fb7f91a7bd41ffb20
env:
GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_OWNER: "${{ github.repository_owner }}"
GITHUB_REPO: ${{ github.event.repository.name }}
with:
Expand Down
Loading