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

fix(workflow): Update permissions in zephyr-hal workflow #994

Merged
merged 4 commits into from
May 13, 2024
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
24 changes: 12 additions & 12 deletions .github/workflows/zephyr-hal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ 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:
if_merged:
# Run only when a PR is merged
if: github.event.pull_request.merged == true

# The type of OS that the job will run on
runs-on: [ ubuntu-latest ]

Expand All @@ -39,6 +36,7 @@ jobs:
with:
# Specific Branch, tag, or SHA to checkout (uses default branch if empty)
ref: ''
ssh-key: ${{ secrets.MSDK_SSH_KEY }}
# Repository name (Default will be the current repo the action is running from)
repository: ${{ github.repository }}
fetch-depth: 0
Expand All @@ -51,6 +49,7 @@ jobs:
with:
# Specific Branch, tag, or SHA to checkout (uses default branch if empty)
ref: 'develop'
ssh-key: ${{ secrets.MSDK_SSH_KEY }}
# 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'
Expand All @@ -66,11 +65,12 @@ 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: Push changes to hal_adi repository
Copy link
Contributor

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 [email protected]: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

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: https://github.com/analogdevicesinc/msdk/pull/${PR_NUM}"
git push
Loading