Skip to content

Commit

Permalink
chore(deps): try another approach for... (#2018)
Browse files Browse the repository at this point in the history
chore(deps): try another approach for getting GITHUB_TOKEN into the yarn lock regen

Signed-off-by: Nick Boldt <[email protected]>
  • Loading branch information
nickboldt authored Aug 7, 2024
1 parent 2543b90 commit de05a97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/actions/yarn-lock/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ runs:
git config --global user.email [email protected]
git config --global pull.rebase true
git config --global push.default matching
# workaround for "fatal: could not read Username for 'https://github.com'"
git config remote.origin.url "https://${GITHUB_TOKEN}:[email protected]/janus-idp/backstage-plugins.git"
git stash || true
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ jobs:
app-id: ${{ vars.JANUS_IDP_GITHUB_APP_ID }}
private-key: ${{ secrets.JANUS_IDP_GITHUB_APP_PRIVATE_KEY }}

- name: Setup git credentials
run: git config --global url.https://${{ steps.generate-token.outputs.token }}@github.com/.insteadOf https://github.com/
# - name: Setup git credentials
# run: |
# git config --global url.https://rhdh-bot:${{ steps.generate-token.outputs.token }}@github.com/.insteadOf https://github.com/
# # Fix for Could not read Username / No such device or address :: https://github.com/github/hub/issues/1644
# # git config --global hub.protocol https
# # git remote set-url origin 'https://\$GITHUB_TOKEN:x-oauth-basic@'

- name: Regen yarn.lock
uses: ./.github/actions/yarn-lock
Expand Down

0 comments on commit de05a97

Please sign in to comment.