Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variables test #27

Closed
wants to merge 8 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/variablesTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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 }}