-
Notifications
You must be signed in to change notification settings - Fork 82
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
fix(workflow): Update permissions in zephyr-hal workflow #994
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attempted to run a manual test on this branch (https://github.com/analogdevicesinc/msdk/actions/runs/8725113677)
We should also modify the workflow logic to support manual dispatches
Removed conditional - job doesn't get skipped now. |
Looking into a new permissions issue that popped up. |
Nice, now we can test it at least |
.github/workflows/zephyr-hal.yml
Outdated
git config --global user.email "actions@github.com" | ||
git config --global user.name "GitHub Actions" | ||
git add * | ||
git commit -m "Update Zephyr MSDK Hal based on MSDK PR# ${PR_NUM}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add
https://github.com/analogdevicesinc/msdk/pull/${PR_NUM}
in commit message too, to easily access related MSDK PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. GitHub should also automatically reformat the PR link to #123
, for example, as well.
.github/workflows/zephyr-hal.yml
Outdated
@@ -51,6 +49,7 @@ jobs: | |||
with: | |||
# Specific Branch, tag, or SHA to checkout (uses default branch if empty) | |||
ref: 'develop' | |||
token: ${{ secrets.ZEPHYRHAL }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sihyung-maxim have you tried using ssh-key
instead? I recently had some success with it on the MSDKGen repo (see here).
Just need to add the SSH key as a deployment key in the hal_adi repo settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does your SSH key secret hold the private key? If so, I didn't know you use it as a token for actions/checkout
. We have an SSH secret (secrets.MSDK_SSH_KEY
), but the issue right now is pushing files to a target repo outside the source repo where the action was triggered. I'm not sure if the target repo settings need to update its permissions to allow this or not...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
push: true | ||
# Specify path in workspace to the repo you want to push to | ||
cwd: './hal_adi' | ||
- name: Push changes to hal_adi repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sihyung-maxim still seems to be failing (see https://github.com/analogdevicesinc/msdk/actions/runs/9065017493/job/24904593346)
You may want to try adding the SSH link manually and explicitly pushing to it. Should force git to use SSH
git remote add upstream git@github.com:analogdevicesinc/hal_adi.git
git fetch upstream --depth 1
git add *
git commit -m "Update Zephyr MSDK Hal based on MSDK PR: https://github.com/analogdevicesinc/msdk/pull/${PR_NUM}"
git push upstream
This reverts commit adf9d67.
Description
Trying new secrets to push the latest MSDK changes into
analogdevicesinc/hal_adi
.And trying a new GitHub actions account in the workflow.
Checklist Before Requesting Review