From fc1a4780e4798259afdfdb8e8ebc38355653729d Mon Sep 17 00:00:00 2001 From: Anthony Islas Date: Fri, 13 Dec 2024 15:55:35 -0700 Subject: [PATCH 1/3] Demo get info --- .github/workflows/entry_point.yml | 45 ++++++++++++++++++------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/.github/workflows/entry_point.yml b/.github/workflows/entry_point.yml index f4f1f4fb50..6856cf81f6 100644 --- a/.github/workflows/entry_point.yml +++ b/.github/workflows/entry_point.yml @@ -30,25 +30,32 @@ jobs: steps: - name: Dispatch Regression Suite run : | - curl -L \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ github.token }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows/ci.yml/dispatches \ - --data-binary @- << EOF - { - "ref" : "${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.base.ref }}", - "inputs" : - { - "event_name" : "${{ github.event_name }}", - "event_number" : "${{ github.event.number }}", - "test" : "${{ github.event.label.name }}", - "ref" : "${{ github.ref }}", - "sha" : "${{ github.event_name == 'push' && github.sha || github.event.pull_request.head.sha }}" - } - } - EOF + echo "${{ github.event.pull_request.head.repo.fork }}" + echo "${{ github.event.pull_request.head.repo.full_name }}" + echo "${{ github.event.pull_request.head.repo.owner.name }}" + echo "${{ github.event.pull_request.head.repo.owner.id }}" + echo "${{ github.event.pull_request.head.repo.owner.url }}" + echo "${{ github.event.pull_request.head.repo.owner.repos_url }}" + echo "${{ github.event.pull_request.head.repo.owner }}" + # curl -L \ + # -X POST \ + # -H "Accept: application/vnd.github+json" \ + # -H "Authorization: Bearer ${{ github.token }}" \ + # -H "X-GitHub-Api-Version: 2022-11-28" \ + # https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows/ci.yml/dispatches \ + # --data-binary @- << EOF + # { + # "ref" : "${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.base.ref }}", + # "inputs" : + # { + # "event_name" : "${{ github.event_name }}", + # "event_number" : "${{ github.event.number }}", + # "test" : "${{ github.event.label.name }}", + # "ref" : "${{ github.ref }}", + # "sha" : "${{ github.event_name == 'push' && github.sha || github.event.pull_request.head.sha }}" + # } + # } + # EOF From 0c6036d27f8e770fc26f2f1e3ea4ecd3ef646b91 Mon Sep 17 00:00:00 2001 From: Anthony Islas Date: Fri, 13 Dec 2024 16:01:43 -0700 Subject: [PATCH 2/3] More info --- .github/workflows/entry_point.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/entry_point.yml b/.github/workflows/entry_point.yml index 6856cf81f6..7c19c3de4a 100644 --- a/.github/workflows/entry_point.yml +++ b/.github/workflows/entry_point.yml @@ -30,13 +30,18 @@ jobs: steps: - name: Dispatch Regression Suite run : | - echo "${{ github.event.pull_request.head.repo.fork }}" - echo "${{ github.event.pull_request.head.repo.full_name }}" - echo "${{ github.event.pull_request.head.repo.owner.name }}" - echo "${{ github.event.pull_request.head.repo.owner.id }}" - echo "${{ github.event.pull_request.head.repo.owner.url }}" - echo "${{ github.event.pull_request.head.repo.owner.repos_url }}" - echo "${{ github.event.pull_request.head.repo.owner }}" + # echo "${{ github.event.pull_request.head.repo.fork }}" + # echo "${{ github.event.pull_request.head.repo.full_name }}" + # echo "${{ github.event.pull_request.head.repo.owner.name }}" + # echo "${{ github.event.pull_request.head.repo.owner.id }}" + # echo "${{ github.event.pull_request.head.repo.owner.url }}" + # echo "${{ github.event.pull_request.head.repo.owner.repos_url }}" + # echo "${{ github.event.pull_request.head.repo.owner }}" + echo "${{ github.event_name == 'push' }" + echo "${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.repo.full_name }}" + echo "${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.repo.full_name == github.repository }}" + echo "${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.ref || github.event.pull_request.base.ref }}" + # curl -L \ # -X POST \ # -H "Accept: application/vnd.github+json" \ @@ -45,7 +50,7 @@ jobs: # https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows/ci.yml/dispatches \ # --data-binary @- << EOF # { - # "ref" : "${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.base.ref }}", + # "ref" : "${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.ref || github.event.pull_request.base.ref }}", # "inputs" : # { # "event_name" : "${{ github.event_name }}", From 1d74236c9d06ee07114f22bec269f8819dbceabb Mon Sep 17 00:00:00 2001 From: Anthony Islas Date: Fri, 13 Dec 2024 16:02:53 -0700 Subject: [PATCH 3/3] Syntax err --- .github/workflows/entry_point.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/entry_point.yml b/.github/workflows/entry_point.yml index 7c19c3de4a..4fbbc2e706 100644 --- a/.github/workflows/entry_point.yml +++ b/.github/workflows/entry_point.yml @@ -37,7 +37,7 @@ jobs: # echo "${{ github.event.pull_request.head.repo.owner.url }}" # echo "${{ github.event.pull_request.head.repo.owner.repos_url }}" # echo "${{ github.event.pull_request.head.repo.owner }}" - echo "${{ github.event_name == 'push' }" + echo "${{ github.event_name == 'push' }}" echo "${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.repo.full_name }}" echo "${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.repo.full_name == github.repository }}" echo "${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.ref || github.event.pull_request.base.ref }}"