Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 13 additions & 1 deletion .github/workflows/cla-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,21 @@ jobs:
core.setOutput("corporate_authorization_display_name", corporateAuthorizationDisplayName);
core.setOutput("sign_comment", signComment);

- name: Detect GitHub App token configuration
id: detect_app_auth
run: |
if [ -n "${APP_ID}" ] && [ -n "${APP_PRIVATE_KEY}" ]; then
echo "enabled=true" >> "$GITHUB_OUTPUT"
else
echo "enabled=false" >> "$GITHUB_OUTPUT"
fi
env:
APP_ID: ${{ inputs.app-id }}
APP_PRIVATE_KEY: ${{ secrets.CLA_APP_PRIVATE_KEY }}

- name: Create GitHub App token
id: app_token
if: ${{ inputs.app-id != '' && secrets.CLA_APP_PRIVATE_KEY != '' }}
if: ${{ steps.detect_app_auth.outputs.enabled == 'true' }}
uses: actions/create-github-app-token@v2
with:
app-id: ${{ inputs.app-id }}
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/pr-compliance-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,21 @@ jobs:
validate-pr-metadata:
runs-on: ubuntu-latest
steps:
- name: Detect GitHub App token configuration
id: detect_app_auth
run: |
if [ -n "${APP_ID}" ] && [ -n "${APP_PRIVATE_KEY}" ]; then
echo "enabled=true" >> "$GITHUB_OUTPUT"
else
echo "enabled=false" >> "$GITHUB_OUTPUT"
fi
env:
APP_ID: ${{ inputs.app-id }}
APP_PRIVATE_KEY: ${{ secrets.CLA_APP_PRIVATE_KEY }}

- name: Create GitHub App token
id: app_token
if: ${{ inputs.app-id != '' && secrets.CLA_APP_PRIVATE_KEY != '' }}
if: ${{ steps.detect_app_auth.outputs.enabled == 'true' }}
uses: actions/create-github-app-token@v2
with:
app-id: ${{ inputs.app-id }}
Expand Down
Loading