File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 77 description : ' Environment to promote to'
88 type : environment
99 required : true
10- release_tag :
11- description : " The tag of the release to be promoted"
12- required : true
1310
1411env :
1512 AWS_REGION : eu-west-2
2825 version : ${{ steps.variables.outputs.version }}
2926 release_tag : ${{ steps.variables.outputs.release_tag }}
3027 steps :
28+ - name : " Check ref"
29+ run : |
30+ if ${{ !startsWith(github.ref, 'refs/tags/') }}; then
31+ echo "❌ Only tagged promotions allowed."
32+ exit 1
33+ fi
3134 - name : " Checkout code"
3235 uses : actions/checkout@v5
3336 - name : " Set CI/CD variables"
3942 echo "build_epoch=$(date --date=$datetime -u +'%s')" >> $GITHUB_OUTPUT
4043 # TODO: Get the version, but it may not be the .version file as this should come from the CI/CD Pull Request Workflow
4144 echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
42- echo "release_tag=${{ github.event.inputs.release_tag }}" >> $GITHUB_OUTPUT
45+ echo "release_tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT
4346 - name : " List variables"
4447 run : |
4548 export BUILD_DATETIME="${{ steps.variables.outputs.build_datetime }}"
5457 uses : ./.github/workflows/stage-6-promote.yaml
5558 with :
5659 environment : ${{ inputs.environment }}
57- release_tag : ${{ inputs .release_tag }}
60+ release_tag : ${{ needs.metadata.outputs .release_tag }}
5861 secrets : inherit
You can’t perform that action at this time.
0 commit comments