From 83aba50640ebd1714d56cb5518f12a761a3a955e Mon Sep 17 00:00:00 2001 From: shadeofblue Date: Tue, 7 Nov 2023 13:18:55 +0100 Subject: [PATCH] example github workflow passing data between steps --- .../workflows/passing_args_between_steps.yml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/passing_args_between_steps.yml diff --git a/.github/workflows/passing_args_between_steps.yml b/.github/workflows/passing_args_between_steps.yml new file mode 100644 index 0000000..c39b517 --- /dev/null +++ b/.github/workflows/passing_args_between_steps.yml @@ -0,0 +1,33 @@ +on: + push: + +jobs: + aaa: + name: Build the image + runs-on: ubuntu-latest + + steps: + - name: Set test output + run: echo "::set-output name=test::test output" + id: test + - name: Get DEV YAML image tag + run: echo "YAML_IMAGE_TAG=dupa" >> $GITHUB_ENV + - name: Set YAML image tag + run: echo "::set-output name=tag::$YAML_IMAGE_TAG" + id: yaml_image_tag + - name: Test env + run: echo ${{ env.YAML_IMAGE_TAG }} + - name: Test env2 + run: echo $YAML_IMAGE_TAG + - name: Echo test output + run: echo ${{ steps.test.outputs.test}} + - name: Echo yaml image tag + run: echo ${{ steps.yaml_image_tag.outputs.tag}} + - name: Test is dupa + run: echo "is dupa" + if: + ${{ steps.yaml_image_tag.outputs.tag == 'dupa' }} + - name: Test is nothing + run: echo "is nothing" + if: + ${{ steps.yaml_image_tag.outputs.tag == '' }}