-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update permissions in zephyr-hal workflow
- Loading branch information
1 parent
aad12c7
commit e4dfb36
Showing
1 changed file
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ on: | |
|
||
env: | ||
# Add environment variables here | ||
PR_NUM: ${{ github.event.number }} | ||
PR_NUM: ${{ github.event.pull_request.number }} | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
|
@@ -39,6 +39,7 @@ jobs: | |
with: | ||
# Specific Branch, tag, or SHA to checkout (uses default branch if empty) | ||
ref: '' | ||
token: ${{ secrets.ZEPHYRHAL }} | ||
# Repository name (Default will be the current repo the action is running from) | ||
repository: ${{ github.repository }} | ||
fetch-depth: 0 | ||
|
@@ -51,6 +52,7 @@ jobs: | |
with: | ||
# Specific Branch, tag, or SHA to checkout (uses default branch if empty) | ||
ref: 'develop' | ||
token: ${{ secrets.ZEPHYRHAL }} | ||
# Name of different repository ('organization_name/repo_name') | ||
# Update the following line to point to the hal_adi repo once that repo is created. | ||
repository: 'analogdevicesinc/hal_adi' | ||
|
@@ -66,11 +68,18 @@ jobs: | |
# directory that contains the 'msdk' and 'hal_adi' folders. | ||
bash ./msdk/.github/workflows/scripts/zephyr-hal.sh | ||
- name: Push hal_adi repository | ||
uses: EndBug/[email protected] | ||
with: | ||
add: '*' | ||
message: 'Updating Zephyr MSDK Hal based on msdk PR# $PR_NUM' | ||
push: true | ||
# Specify path in workspace to the repo you want to push to | ||
cwd: './hal_adi' | ||
- name: Set up SSH key | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.MSDK_SSH_KEY }}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
- name: Push changes to hal_adi repository | ||
run: | | ||
echo "$(pwd) - $(ls)" | ||
cd ./hal_adi | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
git add * | ||
git commit -m "Update Zephyr MSDK Hal based on MSDK PR# ${PR_NUM}" | ||
git push |