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

chore(ci): update submodule with token #198

Merged
merged 1 commit into from
Mar 1, 2022
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
7 changes: 6 additions & 1 deletion .github/workflows/process-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ jobs:

- run: git checkout chore/release
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line will be removed later by a PR from chore/release to main. But we need it for now, because the submodule is configured in chore/release branch.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok thanks for the explanation :)


- run: git submodule update --init --recursive
- run: |
git config --file .gitmodules --get-regexp url | while read url; do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And actions/checkout@v2 has an issue with cloning submodules correctly, so this workaround seems to be needed.

I had only git submodule update --init --recursive, but it failed because of lack of "permission". I suspect, the given github token by GitHub Action cannot touch other repositories than this. So this part applies the personal access token to the origin configuration, which gives more permission to touch other repositories.

git config --file=.gitmodules $(echo "$url" | sed -E "s/[email protected]:|https:\/\/github.com\//https:\/\/${{ secrets.TOKEN_RELEASE_BOT }}:${{ secrets.TOKEN_RELEASE_BOT }}@github.com\//")
done
git submodule sync
git submodule update --init --recursive

- name: Setup
id: setup
Expand Down