Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created May 7, 2023 19:18
Show Gist options
  • Select an option

  • Save KyMidd/668b09f654139c536aa1543898493afe to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/668b09f654139c536aa1543898493afe to your computer and use it in GitHub Desktop.
job2-read-var:
runs-on: ubuntu-latest
needs: pass-var
steps:
- name: Download Env Vars
id: download-env-vars
uses: actions/download-artifact@v3
with:
name: env-cache-${{ github.run_id }}
- name: Read Env Vars
id: read-env-vars
run: |
cat env.vars >> $GITHUB_ENV
- name: Print the deploy location
run: |
if [ -z "$ENVIRONMENT" ]; then
echo "No ENVIRONMENT var set, exiting"
exit 1
else
echo "The ENVIRONMENT var is set to: $ENVIRONMENT"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment