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 3624f84808 fix 6
3624f84808 is described below

commit 3624f848089a79ac395ab6b30fdc8022149d20fa
Author: Daniel Gaspar <[email protected]>
AuthorDate: Wed Jan 29 12:00:40 2025 +0000

    fix 6
---
 .github/workflows/ephemeral-env.yml | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/ephemeral-env.yml 
b/.github/workflows/ephemeral-env.yml
index 9c95714a8b..f722c091cb 100644
--- a/.github/workflows/ephemeral-env.yml
+++ b/.github/workflows/ephemeral-env.yml
@@ -4,7 +4,7 @@ name: Ephemeral env workflow
 # gh workflow run ephemeral-env.yml --ref fix_ephemerals --field 
label_name="testenv-up" --field issue_number=666
 
 on:
-  pull_request:
+  pull_request_target:
     types:
       - labeled
   workflow_dispatch:
@@ -76,15 +76,8 @@ jobs:
 
       - name: Check if a commit was pushed after PR was labeled
         id: get-sha
-        env:
-          COMMENT_AT: ${{ github.event.pull_request.updated_at }}
-          PUSHED_AT: ${{ fromJSON(steps.get-pr-info.outputs.result).pushed_at 
}}
         run: |
-          if [[ $(date -d "$PUSHED_AT" +%s) -gt $(date -d "$COMMENT_AT" +%s) 
]]; then
-           echo "Commit was pushed after the PR was updated."
-           exit 1
-          fi
-          echo "sha=${{ fromJSON(steps.get-pr-info.outputs.result).head.sha 
}}" >> $GITHUB_OUTPUT
+          echo "sha=${{ github.event.pull_request.head.sha }}" >> 
$GITHUB_OUTPUT
 
       - name: Looking for feature flags in PR description
         uses: actions/github-script@v7
@@ -134,10 +127,9 @@ jobs:
               body,
             });
 
-
   ephemeral-docker-build:
     concurrency:
-      group: ${{ github.workflow }}-${{ github.event.inputs.issue_number || 
github.event.issue.number || github.run_id }}-build
+      group: ${{ github.workflow }}-${{ github.event.pull_request.number || 
github.run_id }}-build
       cancel-in-progress: true
     needs: ephemeral-env-label
     if: needs.ephemeral-env-label.outputs.slash-command == 'up'
@@ -307,7 +299,7 @@ jobs:
               issue_number: ${{ github.event.inputs.issue_number || 
github.event.issue.number }},
               owner: context.repo.owner,
               repo: context.repo.repo,
-              body: '@${{ context.actor }} Ephemeral environment spinning up 
at http://${{ steps.get-ip.outputs.ip }}:8080. Credentials are `admin`/`admin`. 
Please allow several minutes for bootstrapping and startup.'
+              body: '@${{ github.actor }} Ephemeral environment spinning up at 
http://${{ steps.get-ip.outputs.ip }}:8080. Credentials are `admin`/`admin`. 
Please allow several minutes for bootstrapping and startup.'
             })
       - name: Comment (failure)
         if: ${{ failure() }}

Reply via email to