From 5d61558ef334fff81741662a272350115c255ac4 Mon Sep 17 00:00:00 2001 From: samoht9277 Date: Fri, 9 Feb 2024 17:59:59 -0300 Subject: [PATCH 1/2] Changed tailscale tag. --- .github/workflows/deploy-production.yaml | 4 ++-- .github/workflows/deploy-testing.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-production.yaml b/.github/workflows/deploy-production.yaml index 61e0b9c1..1bd37cd9 100644 --- a/.github/workflows/deploy-production.yaml +++ b/.github/workflows/deploy-production.yaml @@ -26,14 +26,14 @@ jobs: with: oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }} oauth-secret: ${{ secrets.TS_OAUTH_SECRET }} - tags: tag:server + tags: tag:ci - name: Create ssh private key file from env var env: SSH_KEY: ${{ secrets.SSH_KEY }} TS_HOST: ${{ vars.TS_HOST }} run: | - mkdir -p ~/.ssh/ + mkdir ~/.ssh/ sed -E 's/(-+(BEGIN|END) OPENSSH PRIVATE KEY-+) *| +/\1\n/g' <<< "$SSH_KEY" > ~/.ssh/id_ed25519 chmod 400 ~/.ssh/id_ed25519 retries=5; until ssh-keyscan $TS_HOST >> ~/.ssh/known_hosts || [ $retries -eq 0 ]; do ((retries--)); sleep 5; done diff --git a/.github/workflows/deploy-testing.yaml b/.github/workflows/deploy-testing.yaml index 7b8d8c84..9413b26d 100644 --- a/.github/workflows/deploy-testing.yaml +++ b/.github/workflows/deploy-testing.yaml @@ -27,14 +27,14 @@ jobs: with: oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }} oauth-secret: ${{ secrets.TS_OAUTH_SECRET }} - tags: tag:server + tags: tag:ci - name: Create ssh private key file from env var env: SSH_KEY: ${{ secrets.SSH_KEY }} TS_HOST: ${{ vars.TS_HOST }} run: | - mkdir -p ~/.ssh/ + mkdir ~/.ssh/ sed -E 's/(-+(BEGIN|END) OPENSSH PRIVATE KEY-+) *| +/\1\n/g' <<< "$SSH_KEY" > ~/.ssh/id_ed25519 chmod 400 ~/.ssh/id_ed25519 retries=5; until ssh-keyscan $TS_HOST >> ~/.ssh/known_hosts || [ $retries -eq 0 ]; do ((retries--)); sleep 5; done From 51a429b60982666b815b085339a104805677cd04 Mon Sep 17 00:00:00 2001 From: samoht9277 Date: Fri, 9 Feb 2024 18:26:47 -0300 Subject: [PATCH 2/2] Added -p to mkdir. --- .github/workflows/deploy-production.yaml | 2 +- .github/workflows/deploy-testing.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-production.yaml b/.github/workflows/deploy-production.yaml index 1bd37cd9..3f60ffa2 100644 --- a/.github/workflows/deploy-production.yaml +++ b/.github/workflows/deploy-production.yaml @@ -33,7 +33,7 @@ jobs: SSH_KEY: ${{ secrets.SSH_KEY }} TS_HOST: ${{ vars.TS_HOST }} run: | - mkdir ~/.ssh/ + mkdir -p ~/.ssh/ sed -E 's/(-+(BEGIN|END) OPENSSH PRIVATE KEY-+) *| +/\1\n/g' <<< "$SSH_KEY" > ~/.ssh/id_ed25519 chmod 400 ~/.ssh/id_ed25519 retries=5; until ssh-keyscan $TS_HOST >> ~/.ssh/known_hosts || [ $retries -eq 0 ]; do ((retries--)); sleep 5; done diff --git a/.github/workflows/deploy-testing.yaml b/.github/workflows/deploy-testing.yaml index 9413b26d..de1656c5 100644 --- a/.github/workflows/deploy-testing.yaml +++ b/.github/workflows/deploy-testing.yaml @@ -34,7 +34,7 @@ jobs: SSH_KEY: ${{ secrets.SSH_KEY }} TS_HOST: ${{ vars.TS_HOST }} run: | - mkdir ~/.ssh/ + mkdir -p ~/.ssh/ sed -E 's/(-+(BEGIN|END) OPENSSH PRIVATE KEY-+) *| +/\1\n/g' <<< "$SSH_KEY" > ~/.ssh/id_ed25519 chmod 400 ~/.ssh/id_ed25519 retries=5; until ssh-keyscan $TS_HOST >> ~/.ssh/known_hosts || [ $retries -eq 0 ]; do ((retries--)); sleep 5; done