From edbe167bc6b45a231000db86a85e225e08f4553e Mon Sep 17 00:00:00 2001 From: Max Cascone Date: Thu, 8 Aug 2024 14:00:22 -0500 Subject: [PATCH] Create envtest.yml --- .github/workflows/envtest.yml | 65 +++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/envtest.yml diff --git a/.github/workflows/envtest.yml b/.github/workflows/envtest.yml new file mode 100644 index 0000000..355dd07 --- /dev/null +++ b/.github/workflows/envtest.yml @@ -0,0 +1,65 @@ +name: Hi Mascot + +on: push + +# global env var +env: + mascot: Mona + +defaults: + run: + shell: bash + +jobs: + windows_job: + name: Windows Job + runs-on: ubuntu-latest + steps: + - name: uses wf env + run: echo 'Hi ${{ env.mascot }}' # Hi Mona + + - name: uses step env + run: echo 'Hi ${{ env.mascot }}' # Hi Octocat + env: + mascot: Octocat + + linux_job: + name: Linux Job + needs: windows_job + runs-on: ubuntu-latest + env: + mascot: Tux + outputs: + mascot: ${{ steps.outstep.outputs.mascot }} + steps: + - name: uses job env + run: echo 'Hi ${{ env.mascot }}' # Hi Tux + + - name: set gritty env var + run: echo "mascot=Gritty" >> $GITHUB_ENV + + - name: uses changed job env + run: echo 'Hi ${{ env.mascot }}' # Hi Gritty + + - name: uses step env + run: echo "Hi ${{ env.mascot }}" # Hi Mika + env: + mascot: Mika + + - name: uses job env again + run: echo 'Hi ${{ env.mascot }}' # Hi Gritty + + - name: set output using job env + id: outstep + run: echo "mascot=${{ env.mascot }}" >> $GITHUB_OUTPUT # Gritty + + macos_job: + name: macOS Job + needs: linux_job + runs-on: ubuntu-latest + steps: + - name: uses wf env + run: echo 'Hi ${{ env.mascot }}' # Hi Mona + + - name: uses prior job output + run: echo 'Hi ${{ needs.linux_job.outputs.mascot }}' # Hi Gritty