Skip to content

Variables test

Variables test #3

Workflow file for this run

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: $env.DOCKER_IMAGE_TAG = ":refs_heads_${GITHUB_HEAD_REF}-bk0"
- name: Echo DOCKER_IMAGE_TAG again
run: echo ${{ env.DOCKER_IMAGE_TAG }}
check_permanence:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Echo DOCKER_IMAGE_TAG again
run: echo ${{ env.DOCKER_IMAGE_TAG }}