make check_permanence job depend on check_event job #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test env variables | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
env: | |
DOCKER_IMAGE_TAG: :refs_heads_${{ github.ref_name }}-bk0 | |
jobs: | |
check_event: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Echo variables | |
run: | | |
echo ${{ env.DOCKER_IMAGE_TAG }} | |
echo ${{ github.event_name }} | |
echo ${{ github.HEAD_REF }} | |
- name: Check for DOCKER_IMAGE_TAG change | |
if: github.event_name == 'pull_request' | |
run: echo "DOCKER_IMAGE_TAG=:refs_heads_${GITHUB_HEAD_REF}-bk0" >> $GITHUB_ENV | |
- name: Echo DOCKER_IMAGE_TAG again | |
run: echo ${{ env.DOCKER_IMAGE_TAG }} | |
check_permanence: | |
needs: [check_event] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Echo DOCKER_IMAGE_TAG again | |
run: echo ${{ env.DOCKER_IMAGE_TAG }} |