From dbf2620004f51f146a70a2a16eafa122538c0905 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Tue, 5 Dec 2023 19:02:38 -0800 Subject: [PATCH 1/2] Consume action in workflow --- .github/workflows/pr-open.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index ad9e9c9..29be0e6 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -28,8 +28,7 @@ jobs: steps: - uses: actions/checkout@v4 - id: vars - # uses: ./ - run: echo "pr=1" >> $GITHUB_OUTPUT + uses: ./ verify-pr: name: Verify PR number From 8e930473360d78b3d0adcd830eae3dd12ab66f47 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Tue, 5 Dec 2023 19:11:41 -0800 Subject: [PATCH 2/2] Output --- action.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 1c91188..dee257d 100644 --- a/action.yml +++ b/action.yml @@ -29,14 +29,16 @@ runs: - id: vars shell: bash run: | + set -eux + # Get PR number (different process for merge queue) if [ ${{ github.event_name }} == 'pull_request' ] then - tag=${{ github.event.number }} + pr=${{ github.event.number }} else - tag=$(echo ${{ github.event.merge_group.head_ref }} | grep -Eo "queue/main/pr-[0-9]+" | cut -d '-' -f2) + pr=$(echo ${{ github.event.merge_group.head_ref }} | grep -Eo "queue/main/pr-[0-9]+" | cut -d '-' -f2) fi echo "Summary ---" - echo -e "\tTag (PR no): ${tag}" - echo "tag=${tag}" >> $GITHUB_OUTPUT + echo -e "\tPR: ${pr}" + echo "pr=${pr}" >> $GITHUB_OUTPUT