Skip to content

Commit

Permalink
add variablesTest.yml for testing purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
bquan0 committed Aug 21, 2023
1 parent 81a7de7 commit fc0dd22
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/variablesTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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 }}
- name: Check for DOCKER_IMAGE_TAG change
if: GITHUB_EVENT_NAME == 'pull_request'
run: echo ":refs_heads_${GITHUB_HEAD_REF}-bk0" >> $env.DOCKER_IMAGE_TAG

- 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 }}

0 comments on commit fc0dd22

Please sign in to comment.