Skip to content

Commit

Permalink
Merge pull request os-fpga#1464 from NadeemYaseen/main
Browse files Browse the repository at this point in the history
Update main.yml to add conditions related to Fork
  • Loading branch information
alaindargelas authored Jan 29, 2024
2 parents 1209bf9 + 2387366 commit 0ab9a96
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:

- name: ssh-agent
uses: webfactory/[email protected]
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_FOEDAG }}
Expand Down Expand Up @@ -86,7 +87,12 @@ jobs:
then
echo 'p_devices=${{ inputs.DEFAULT_DEVICES }}' >> $GITHUB_ENV
else
echo 'p_devices=$DEFAULT_DEVICES' >> $GITHUB_ENV
if [ ${{ github.event.pull_request.head.repo.full_name }} == ${{ github.repository }} ]
then
echo 'p_devices=${{ secrets.DefaultDevice }}' >> $GITHUB_ENV
else
echo 'p_devices=MPW1' >> $GITHUB_ENV
fi
fi
if [ ${{ github.repository_owner }} == 'os-fpga' ]
then
Expand Down Expand Up @@ -215,6 +221,7 @@ jobs:
steps:

- name: ssh-agent
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
uses: webfactory/[email protected]
with:
ssh-private-key: |
Expand Down Expand Up @@ -266,9 +273,14 @@ jobs:
event_type=`echo ${{ github.event_name }}`
if [ $event_type == 'workflow_dispatch' ]
then
echo 'p_devices=${{ inputs.DEFAULT_DEVICES }}' >> $GITHUB_ENV
echo 'p_devices=${{ inputs.DEFAULT_DEVICES }}' >> $GITHUB_ENV
else
echo 'p_devices=$DEFAULT_DEVICES' >> $GITHUB_ENV
if [ ${{ github.event.pull_request.head.repo.full_name }} == ${{ github.repository }} ]
then
echo 'p_devices=${{ secrets.DefaultDevice }}' >> $GITHUB_ENV
else
echo 'p_devices=MPW1' >> $GITHUB_ENV
fi
fi
if [ ${{ github.repository_owner }} == 'os-fpga' ]
then
Expand Down

0 comments on commit 0ab9a96

Please sign in to comment.