Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
Try to use a github action for importing GPG key.
  • Loading branch information
alitpc25 authored Nov 26, 2023
1 parent 844280f commit 18aafb4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ jobs:
- name: Checkout Repository
uses: actions/[email protected]

- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v1
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
RESQ_PASSPHRASE: ${{ secrets.RESQ_PASSPHRASE }}

- name: Decrypt and Extract project_env_prod
env:
RESQ_PASSPHRASE: ${{ secrets.RESQ_PASSPHRASE }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
cd ./resq/backend/resq/
echo "$GPG_PRIVATE_KEY" | tr -d '[:space:]' | gpg --import
gpg --quiet --batch --yes --decrypt --passphrase="$RESQ_PASSPHRASE" --output project_env_prod.tar.gz project_env_prod.tar.gz.gpg
tar xzvf project_env_prod.tar.gz
Expand Down

0 comments on commit 18aafb4

Please sign in to comment.