12name: 'Preparation'3description: ''4runs:5 using: "composite"6 steps:7 - name: Setup Environment (PR) 8 if: ${{ github.event_name == 'pull_request' }} 9 shell: bash 10 run: | 11 echo "LAST_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> ${GITHUB_ENV} 12 - name: Setup Environment (Push) 13 if: ${{ github.event_name == 'push' }} 14 shell: bash 15 run: | 16 echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV}17 - name: Set build SHA18 shell: bash19 run: |20 echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV