Skip to content

Commit

Permalink
last try
Browse files Browse the repository at this point in the history
Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla committed Sep 27, 2023
1 parent 9cf0444 commit bca03e3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/cypress_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,18 @@ jobs:
uses: actions/github-script@v6
with:
script: |
await github.rest.pulls.get({
const { data: result } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: ${{ inputs.pr_number }}
});
return result;
- name: Set source repo from PR number
if: ${{ github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }}
run: |
echo "SOURCE_REPO=${{ steps.get_pr_info.outputs.result.data.head.repo.full_name }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH=${{ steps.get_pr_info.outputs.result.data.head.ref }}" >> $GITHUB_ENV
echo "SOURCE_REPO=${{ steps.get_pr_info.outputs.head.repo.full_name }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH=${{ steps.get_pr_info.outputs.head.ref }}" >> $GITHUB_ENV
- name: Find Comment
uses: peter-evans/find-comment@v2
Expand Down Expand Up @@ -116,17 +117,18 @@ jobs:
uses: actions/github-script@v6
with:
script: |
await github.rest.pulls.get({
const { data: result } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: ${{ inputs.pr_number }}
});
return result;
- name: Set source repo from PR number
if: ${{ github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }}
run: |
echo "SOURCE_REPO=${{ steps.get_pr_info.outputs.result.data.head.repo.full_name }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH=${{ steps.get_pr_info.outputs.result.data.head.ref }}" >> $GITHUB_ENV
echo "SOURCE_REPO=${{ steps.get_pr_info.outputs.head.repo.full_name }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH=${{ steps.get_pr_info.outputs.head.ref }}" >> $GITHUB_ENV
- run: |
echo "Source repo: ${{ env.SOURCE_REPO }}"
Expand Down

0 comments on commit bca03e3

Please sign in to comment.