Skip to content

Instantly share code, notes, and snippets.

@upalexgill
Created July 26, 2023 20:22
Show Gist options
  • Save upalexgill/8a999d4872232437cb43c6f6edb8f629 to your computer and use it in GitHub Desktop.
Save upalexgill/8a999d4872232437cb43c6f6edb8f629 to your computer and use it in GitHub Desktop.
Github Actions / Workflow: Create env file with secrets
name: Create Environment Variables
on: push
jobs:
dev-build:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop'
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Create develop env file
env:
DEV_ENV_FILE: ${{ secrets.DEV_ENV_FILE }}
run: |
touch .env.develop
echo $DEV_ENV_FILE >> .env.develop
echo "cat .env.develop"
cat .env.develop
echo "ls -a ."
ls -a .
echo "ls -a ${{ github.workspace }}"
ls -a ${{ github.workspace }}
shell: bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment