Skip to content

Commit c05dff4

Browse files
committed
refactor(publish.yml): remove unnecessary environment variables
chore(publish.yml): improve the way the SSH key is handled. The private key is now written to a file and the file permissions are set correctly. This improves security.
1 parent 2d58fe1 commit c05dff4

File tree

2 files changed

+9
-29
lines changed

2 files changed

+9
-29
lines changed

.github/workflows/playwright.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ jobs:
4444
echo "TUNNEL_HOST=${{ secrets.TUNNEL_HOST }}" >> .env
4545
echo "TUNNEL_USER=${{ secrets.TUNNEL_USER }}" >> .env
4646
echo "TUNNEL_PORT=22" >> .env
47-
echo "TUNNEL_PRIVATE_KEY_PATH=" >> .env
48-
echo "TUNNEL_PRIVATE_KEY=${{ secrets.TUNNEL_PRIVATE_KEY }}" >> .env
47+
echo "TUNNEL_PRIVATE_KEY=" >> .env
48+
echo "TUNNEL_PRIVATE_KEY_PATH=~/.ssh/tunnel_key" >> .env
4949
echo "TUNNEL_DEST_HOST=${{ secrets.TUNNEL_DEST_HOST }}" >> .env
5050
echo "TUNNEL_DEST_PORT=${{ secrets.TUNNEL_DEST_PORT }}" >> .env
5151
echo "TUNNEL_LOCAL_PORT=${{ secrets.TUNNEL_LOCAL_PORT }}" >> .env
@@ -65,7 +65,14 @@ jobs:
6565
echo "GOOGLE_OAUTH_REDIRECT_URI=" >> .env
6666
echo "RESEND_API_KEY=" >> .env
6767
echo "CMP_CLIENT_ID=${{ secrets.CMP_CLIENT_ID }}" >> .env
68+
6869
cat .env
70+
71+
- name: Setup SSH key
72+
run: |
73+
mkdir -p ~/.ssh
74+
echo "${{ secrets.TUNNEL_PRIVATE_KEY }}" > ~/.ssh/tunnel_key
75+
chmod 600 ~/.ssh/tunnel_key
6976
7077
- name: Build and push Docker image for Linux
7178
uses: docker/build-push-action@v6

0 commit comments

Comments
 (0)