Skip to content

Commit

Permalink
Hash datasette pw in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
msj committed Dec 1, 2023
1 parent 2b4c3b9 commit 2e32d88
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,17 @@ jobs:
heroku_email: ${{ secrets.HEROKU_EMAIL }}
justlogin: true

- name: Get hashed Datasette password
run: |
# Store hash as an environment variable
hash=$(echo "${{ secrets.DATASETTE_INSTANCE_PW }}" \
| datasette hash-password --no-confirm); \
echo "hash=$hash" >> $GITHUB_ENV
- name: Deploy Datasette instance to Heroku
run: |
datasette publish heroku cases.db \
-n court-scraper \
-m metadata.json \
--install datasette-auth-passwords \
--plugin-secret datasette-auth-passwords root_password_hash ${{ secrets.DATASETTE_INSTANCE_PW }}
--plugin-secret datasette-auth-passwords root_password_hash ${{ env.hash }}

0 comments on commit 2e32d88

Please sign in to comment.