Skip to content

Commit f4dd1da

Browse files
committed
Added GitHub token to the workflow
1 parent 61d234b commit f4dd1da

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/api_refs.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,30 @@ jobs:
6767
- name: Install Redocly CLI
6868
run: npm install -g @redocly/cli@latest
6969

70+
- name: Generate token
71+
id: generate_token
72+
if: inputs.use_dev_version == true
73+
uses: actions/create-github-app-token@v2
74+
with:
75+
app-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
76+
private-key: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
77+
owner: ibexa
78+
7079
- name: Build API Refs
7180
env:
7281
SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }}
7382
SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }}
83+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
7484
BASE_BRANCH: ${{ steps.version_and_branches.outputs.base_branch }}
7585
DXP_VERSION: ${{ steps.version_and_branches.outputs.dxp_version }}
7686
BASE_DXP_BRANCH: ${{ steps.version_and_branches.outputs.base_dxp_branch }}
7787
VIRTUAL_DXP_VERSION: ${{ steps.version_and_branches.outputs.virtual_dxp_version }}
7888
run: |
89+
if [ -n "$GITHUB_TOKEN" ]; then
90+
composer config --global github-oauth.github.com "$GITHUB_TOKEN"
91+
fi
7992
composer config --global http-basic.updates.ibexa.co $SATIS_NETWORK_KEY $SATIS_NETWORK_TOKEN
93+
8094
if [[ '4.6' != $BASE_BRANCH ]]; then
8195
tools/api_refs/api_refs.sh
8296
# Fix escape character:

0 commit comments

Comments
 (0)