Skip to content

Commit

Permalink
Merge pull request #176 from gisce/update_ci
Browse files Browse the repository at this point in the history
Use pr ref
  • Loading branch information
polsala authored Feb 14, 2025
2 parents c3f340b + 3a88e9e commit f34a8ae
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ jobs:
run: |
. $SCRIPTS_PATH/update_branches.sh
- name: Get pr from workflow_dispatch
if: github.event_name == 'workflow_dispatch'
run: |
PR_JSON=$(gh api repos/${{ github.repository }}/pulls/${{ inputs.pr_number }})
echo "PR_HEAD_REF=$(echo $PR_JSON | jq -r '.head.ref')" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.RO_GITHUB_ACTIONS_REPOS }}
# - name: Get pr from workflow_dispatch
# if: github.event_name == 'workflow_dispatch'
# run: |
# PR_JSON=$(gh api repos/${{ github.repository }}/pulls/${{ inputs.pr_number }})
# echo "PR_HEAD_REF=$(echo $PR_JSON | jq -r '.head.ref')" >> $GITHUB_ENV
# env:
# GITHUB_TOKEN: ${{ secrets.RO_GITHUB_ACTIONS_REPOS }}

- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
with:
path: custom_modules/${{ github.event.repository.name }}
ref: ${{ env.PR_HEAD_REF || github.ref }}
ref: refs/pull/${{ inputs.pr_number || github.event.pull_request.number }}/head

- name: Checkout erp
uses: actions/checkout@v4
Expand Down

0 comments on commit f34a8ae

Please sign in to comment.