Actions: Attempt to make seed/release key handling less fragile
Using environment variables should avoid the issue of echo not handling newlines in the github secrets properly. Also should fix the possibility of the secret being leaked to the log on error.
@@ -16,9 +16,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Add seed key
- run: echo "${{ secrets.SEED_KEY }}" > keys/seed_key.py
+ run: echo "%SEED_KEY%" > keys/seed_key.py
+ env:
+ SEED_KEY: ${{ secrets.SEED_KEY }}
- name: Add release key
- run: echo ${{ secrets.RELEASE_KEY }} > keys/build_key.txt
+ run: echo "%RELEASE_KEY%" > keys/build_key.txt
+ env:
+ RELEASE_KEY: ${{ secrets.RELEASE_KEY }}
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
@@ -60,9 +64,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Add seed key
- run: echo "${{ secrets.SEED_KEY }}" > keys/seed_key.py
+ run: echo "$SEED_KEY" > keys/seed_key.py
+ env:
+ SEED_KEY: ${{ secrets.SEED_KEY }}
- name: Add release key
- run: echo ${{ secrets.RELEASE_KEY }} > keys/build_key.txt
+ run: echo "$RELEASE_KEY" > keys/build_key.txt
+ env:
+ RELEASE_KEY: ${{ secrets.RELEASE_KEY }}
- name: Set up Miniconda with Python 3.9
uses: goanpeca/setup-miniconda@v1
with:
@@ -107,9 +115,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Add seed key
- run: echo "${{ secrets.SEED_KEY }}" > keys/seed_key.py
+ run: echo "$SEED_KEY" > keys/seed_key.py
+ env:
+ SEED_KEY: ${{ secrets.SEED_KEY }}
- name: Add release key
- run: echo ${{ secrets.RELEASE_KEY }} > keys/build_key.txt
+ run: echo "$RELEASE_KEY" > keys/build_key.txt
+ env:
+ RELEASE_KEY: ${{ secrets.RELEASE_KEY }}
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
