From bd238e4fec61b181daf4f66620b41eed9a55f981 Mon Sep 17 00:00:00 2001 From: Robert Jandow <38583713+robertjndw@users.noreply.github.com> Date: Thu, 24 Aug 2023 14:55:28 +0200 Subject: [PATCH 1/2] Fix typo in prod.yml --- .github/workflows/prod.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 77b1f570..64ee053d 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -1,4 +1,4 @@ -name: Build and Deploy to Dev +name: Build and Deploy to Prod on: push: @@ -16,4 +16,4 @@ jobs: environment: Production server_image_tag: "latest" client_image_tag: "latest" - \ No newline at end of file + From 04929eb598f2fb3824b0bd27cce07c0218d8e69a Mon Sep 17 00:00:00 2001 From: Robert Jandow <38583713+robertjndw@users.noreply.github.com> Date: Thu, 24 Aug 2023 14:56:53 +0200 Subject: [PATCH 2/2] Use org secret for jump host --- .github/workflows/deploy_docker.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy_docker.yml b/.github/workflows/deploy_docker.yml index ac957412..a2ab1b7d 100644 --- a/.github/workflows/deploy_docker.yml +++ b/.github/workflows/deploy_docker.yml @@ -32,7 +32,7 @@ jobs: key: ${{ secrets.VM_SSH_PRIVATE_KEY }} proxy_host: ${{ vars.PROXY_HOST }} proxy_username: ${{ vars.PROXY_USERNAME }} - proxy_key: ${{ secrets.VM_SSH_PRIVATE_KEY }} + proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }} proxy_port: ${{ vars.PROXY_PORT }} script: | docker compose -f docker-compose.prod.yml --env-file=.env.prod down --remove-orphans --rmi all @@ -53,7 +53,7 @@ jobs: key: ${{ secrets.VM_SSH_PRIVATE_KEY }} proxy_host: ${{ vars.PROXY_HOST }} proxy_username: ${{ vars.PROXY_USERNAME }} - proxy_key: ${{ secrets.VM_SSH_PRIVATE_KEY }} + proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }} proxy_port: ${{ vars.PROXY_PORT }} source: "./docker-compose.prod.yml" target: /home/${{ vars.VM_USERNAME }} @@ -66,7 +66,7 @@ jobs: key: ${{ secrets.VM_SSH_PRIVATE_KEY }} proxy_host: ${{ vars.PROXY_HOST }} proxy_username: ${{ vars.PROXY_USERNAME }} - proxy_key: ${{ secrets.VM_SSH_PRIVATE_KEY }} + proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }} proxy_port: ${{ vars.PROXY_PORT }} source: "main.cf" target: /home/${{ vars.VM_USERNAME }}/postfix-config/ @@ -79,7 +79,7 @@ jobs: key: ${{ secrets.VM_SSH_PRIVATE_KEY }} proxy_host: ${{ vars.PROXY_HOST }} proxy_username: ${{ vars.PROXY_USERNAME }} - proxy_key: ${{ secrets.VM_SSH_PRIVATE_KEY }} + proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }} proxy_port: ${{ vars.PROXY_PORT }} source: "master.cf" target: /home/${{ vars.VM_USERNAME }}/postfix-config/ @@ -92,7 +92,7 @@ jobs: key: ${{ secrets.VM_SSH_PRIVATE_KEY }} proxy_host: ${{ vars.PROXY_HOST }} proxy_username: ${{ vars.PROXY_USERNAME }} - proxy_key: ${{ secrets.VM_SSH_PRIVATE_KEY }} + proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }} proxy_port: ${{ vars.PROXY_PORT }} script: | touch .env.prod @@ -127,7 +127,7 @@ jobs: key: ${{ secrets.VM_SSH_PRIVATE_KEY }} proxy_host: ${{ vars.PROXY_HOST }} proxy_username: ${{ vars.PROXY_USERNAME }} - proxy_key: ${{ secrets.VM_SSH_PRIVATE_KEY }} + proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }} proxy_port: ${{ vars.PROXY_PORT }} script: | docker compose -f docker-compose.prod.yml --env-file=.env.prod up --pull=always -d