File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change 3030 name : ' Validate promotion'
3131 runs-on : ubuntu-latest
3232 steps :
33- - name : ' Read env variables'
34- run : |
35- echo "isdevelopment-branch=${{ env.is-development-branch }}"
36- echo "is-maintenance-branch=${{ env.is-maintenance-branch }}"
37- echo "promotion-type=${{ inputs.promotion-type }}"
38- echo "${{ github.ref_name }}"
33+ - name : ' Checkout ${{ github.head_ref || github.ref }}'
34+ uses : actions/checkout@v4
3935 - name : ' Check promotion type'
4036 if : ${{ (inputs.promotion-type != 'release') && (inputs.promotion-type != 'preview') }}
4137 run : |
4642 run : |
4743 echo "Invalid source branch: ${{ github.ref_name }}"
4844 exit 1
45+ - name : ' Determine versions'
46+ uses : ./.github/actions/determine-version
47+ id : determine-version
48+ with :
49+ config-file-path : ' ./.gitversion/version.yml'
50+ run-number : ${{ github.run-number }}
51+ - name : ' Validate target branch'
52+ run : |
53+ if [[ "${{ inputs.promotion-type }}" == "preview" ]]; then
54+ target_branch="preview/${{ steps.determine-version.outputs.friendly-version }}"
55+ else
56+ target_branch="release/${{ steps.determine-version.outputs.friendly-version }}"
57+ fi
58+
59+ echo "Target branch: $target_branch"
60+
61+ git ls-remote --exit-code --heads refs/heads/$target_branch
You can’t perform that action at this time.
0 commit comments