This is an automated email from the ASF dual-hosted git repository.
dpgaspar pushed a commit to branch fix/ci-ephemeral-use-labels
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/fix/ci-ephemeral-use-labels by
this push:
new 4e5ba6250b fix 8
4e5ba6250b is described below
commit 4e5ba6250ba1e610eca87810e1dbe46464d29fed
Author: Daniel Gaspar <[email protected]>
AuthorDate: Wed Jan 29 13:02:17 2025 +0000
fix 8
---
.github/workflows/ephemeral-env.yml | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ephemeral-env.yml
b/.github/workflows/ephemeral-env.yml
index 7cdef1b467..03f1035c6a 100644
--- a/.github/workflows/ephemeral-env.yml
+++ b/.github/workflows/ephemeral-env.yml
@@ -53,10 +53,34 @@ jobs:
exit 1
fi
- - name: Check if a commit was pushed after PR was labeled
+ - name: Get PR Info
+ uses: actions/github-script@v7
+ id: get-pr-info
+ with:
+ script: |
+ const pull_number = context.payload.pull_request
+ ? context.payload.pull_request.number
+ : context.payload.inputs.issue_number;
+
+ if (!pull_number) {
+ throw new Error("Pull request number is not available.");
+ }
+
+ const pr = await github.rest.pulls.get({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ pull_number,
+ });
+
+ return pr.data;
+
+ - name: get SHA will work on pull request target labels and for workflow
dispatch
id: get-sha
run: |
- echo "sha=${{ github.event.pull_request.head.sha }}" >>
$GITHUB_OUTPUT
+ if [ -n "${{ github.event.pull_request.head.sha }}" ]; then
+ echo "sha=${{ github.event.pull_request.head.sha }}" >>
$GITHUB_OUTPUT
+ else
+ echo "sha=${{ steps.get-pr-info.outputs.sha }}" >> $GITHUB_OUTPUT
- name: Looking for feature flags in PR description
uses: actions/github-script@v7