Skip to content

Commit 43d0d7d

Browse files
authored
Merge pull request #260 from Cognipeer/chore/github-app-release-auth
ci: authenticate release dispatch with GitHub App
2 parents 4dffdea + edeec18 commit 43d0d7d

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

‎.github/workflows/build-community.yml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,25 @@ jobs:
5252
- name: Checkout
5353
uses: actions/checkout@v4
5454

55+
- name: Create release automation token
56+
id: app-token
57+
uses: actions/create-github-app-token@v2
58+
with:
59+
app-id: ${{ secrets.RELEASE_AUTOMATION_APP_ID }}
60+
private-key: ${{ secrets.RELEASE_AUTOMATION_PRIVATE_KEY }}
61+
owner: Cognipeer
62+
repositories: console-ee
63+
5564
- name: Update Console Enterprise compatibility pin
5665
env:
57-
DISPATCH_TOKEN: ${{ secrets.CONSOLE_EE_DISPATCH_PAT }}
66+
DISPATCH_TOKEN: ${{ steps.app-token.outputs.token }}
5867
COMMUNITY_TAG: ${{ github.ref_name }}
5968
COMMUNITY_SHA: ${{ needs.build.outputs.commit_sha }}
6069
run: |
6170
set -euo pipefail
6271
6372
if [[ -z "${DISPATCH_TOKEN}" ]]; then
64-
echo "::error::CONSOLE_EE_DISPATCH_PAT is not configured."
73+
echo "::error::GitHub release automation App token is not available."
6574
exit 1
6675
fi
6776

‎.github/workflows/build-deploy.yaml‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,5 @@
7878
# ${{ steps.ecr.outputs.registry }}/${{ secrets.LOCAL_FIRST_REPOSITORY }}:${{ steps.vars.outputs.tag }}
7979
# ${{ secrets.LOGIN_SERVER }}/${{ secrets.LOCAL_SECOND_REPOSITORY }}:${{ steps.vars.outputs.tag }}
8080

81-
# notify:
82-
# runs-on: ubuntu-latest
83-
# needs: build
84-
# steps:
85-
# - name: Fire repository_dispatch
86-
# run: |
87-
# curl --fail-with-body -X POST \
88-
# -H "Authorization: Bearer ${{ secrets.REPO_PAT_TO_DEPLOY }}" \
89-
# -H "Accept: application/vnd.github+json" \
90-
# -H "Content-Type: application/json" \
91-
# https://api.github.com/repos/${{secrets.TENANT_REPO_ADDRESS}}/dispatches \
92-
# -d "{\"event_type\":\"app-released\",\"client_payload\":{\"image_tag\":\"${{ needs.build.outputs.image_tag }}\",\"source_ref\":\"${GITHUB_REF_NAME}\"}}"
81+
# The legacy workflow is disabled. Active release workflows use GitHub App
82+
# installation tokens for cross-repository operations.

0 commit comments

Comments
 (0)