kou commented on code in PR #46076:
URL: https://github.com/apache/arrow/pull/46076#discussion_r2035196885
##########
.github/workflows/verify_rc.yml:
##########
@@ -46,9 +57,9 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #
v4.2.2
- name: Run
run: |
- package_id=${GITHUB_REF_NAME%-rc*}
+ package_id=${RC_TAG%-rc*}
version=${package_id#apache-arrow-}
- rc=${GITHUB_REF_NAME#*-rc}
+ rc=${RC_TAG#*-rc}
Review Comment:
How about creating a job that detects target information something like the
following?
```diff
diff --git a/.github/workflows/verify_rc.yml
b/.github/workflows/verify_rc.yml
index fe46ae6f23..cc1eb6e6bf 100644
--- a/.github/workflows/verify_rc.yml
+++ b/.github/workflows/verify_rc.yml
@@ -30,7 +30,37 @@ env:
VERBOSE: "1"
jobs:
+ target:
+ runs-on: ubuntu-latest
+ timeout: 5
+ outputs:
+ package_id: ${{ steps.detect.outputs.package_id }}
+ version: ${{ steps.detect.outputs.version }}
+ rc: ${{ steps.detect.outputs.rc }}
+ steps:
+ - name: Detect
+ id: detect
+ run: |
+ case "${GITHUB_EVENT_NAME}" in
+ workflow_dispatch)
+ tag="${{ input.rc_tag }}"
+ ;;
+ pull_request)
+ tag="$(detect the latest RC tag)"
+ ;;
+ *)
+ tag="${GITHUB_REF_NAME}"
+ ;;
+ esac
+ package_id=${tag%-rc*}
+ version=${package_id#apache-arrow-}
+ rc=${tag#*-rc}
+ echo "package_id=${package_id}" >> "${GITHUB_OUTPUT}"
+ echo "version=${version}" >> "${GITHUB_OUTPUT}"
+ echo "rc=${rc}" >> "${GITHUB_OUTPUT}"
+
apt:
+ needs: target
name: APT
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 30
@@ -41,15 +71,15 @@ jobs:
- ubuntu-latest
- ubuntu-24.04-arm
env:
+ PACKAGE_ID: ${{ needs.target.outputs.package_id }}
+ RC: ${{ needs.target.outputs.rc }}
TEST_APT: "1"
+ VERSION: ${{ needs.target.outputs.version }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #
v4.2.2
- name: Run
run: |
- package_id=${GITHUB_REF_NAME%-rc*}
- version=${package_id#apache-arrow-}
- rc=${GITHUB_REF_NAME#*-rc}
- dev/release/verify-release-candidate.sh ${version} ${rc}
+ dev/release/verify-release-candidate.sh ${VERSION} ${RC}
binary:
name: Binary
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]