From d273bb75f7eef63ee9a9f9a83cfdf3b735b855eb Mon Sep 17 00:00:00 2001 From: Victor Yap Date: Fri, 5 Apr 2024 21:53:41 +0000 Subject: [PATCH] Use github.head_ref in ci init if the event is a PR --- actions/utils/ci-init/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/utils/ci-init/action.yml b/actions/utils/ci-init/action.yml index 4f6c043f..50ab4b40 100644 --- a/actions/utils/ci-init/action.yml +++ b/actions/utils/ci-init/action.yml @@ -38,8 +38,8 @@ runs: --dagster-cloud-yaml-path=${{ inputs.dagster_cloud_yaml_path }} --deployment=${{ inputs.deployment }} --status-url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - --git-url=${{ github.server_url }}/${{ github.repository }}/tree/${{ github.sha }} - --commit-hash=${{ github.sha }} + --git-url=${{ github.server_url }}/${{ github.repository }}/tree/${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + --commit-hash=${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} $LOCATION_NAMES_FLAG shell: bash