From 5bd8b264c4977b30b070dba6960bfdade2e8b2c5 Mon Sep 17 00:00:00 2001 From: Stefano Verna Date: Fri, 13 Dec 2024 11:25:29 +0100 Subject: [PATCH] wip --- .github/workflows/deploy.yml | 4 ++-- .kamal/secrets.production | 4 ++-- .kamal/secrets.staging | 4 ++-- config/deploy.yml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 17c341b8..eb45dc76 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -46,8 +46,8 @@ jobs: - name: Deploy Application env: - GITHUB_CONTAINER_REGISTRY_API_TOKEN: ${{ secrets.GCR_API_TOKEN }} + CONTAINER_REGISTRY_API_TOKEN: ${{ secrets.GCR_API_TOKEN }} PRIVATE_KEY: ${{ secrets.KAVO_PRIVATE_KEY }} run: | - sed -i -E -e 's/\-\-break 0/--wrap=0/g' -e '/^SECRETS=/d' -e 's/^GITHUB_CONTAINER_REGISTRY_API_TOKEN=.*$/GITHUB_CONTAINER_REGISTRY_API_TOKEN=$GITHUB_CONTAINER_REGISTRY_API_TOKEN/' .kamal/secrets.$KAMAL_DESTINATION + sed -i -E -e 's/\-\-break 0/--wrap=0/g' -e '/^SECRETS=/d' -e 's/^CONTAINER_REGISTRY_API_TOKEN=.*$/CONTAINER_REGISTRY_API_TOKEN=$CONTAINER_REGISTRY_API_TOKEN/' .kamal/secrets.$KAMAL_DESTINATION kamal deploy -d $KAMAL_DESTINATION diff --git a/.kamal/secrets.production b/.kamal/secrets.production index 7e35ba61..c515bca2 100644 --- a/.kamal/secrets.production +++ b/.kamal/secrets.production @@ -11,5 +11,5 @@ ROLLBAR_TOKEN=$(echo $KAVO_SECRETS | base64 --decode | sed -n 's/^ROLLBAR_TOKEN= SECRET_API_TOKEN=$(echo $KAVO_SECRETS | base64 --decode | sed -n 's/^SECRET_API_TOKEN=//p') SLACK_TOKEN=$(echo $KAVO_SECRETS | base64 --decode | sed -n 's/^SLACK_TOKEN=//p') -SECRETS=$(kamal secrets fetch --adapter bitwarden --account s.verna@datocms.com GITHUB_CONTAINER_REGISTRY_API_TOKEN) -GITHUB_CONTAINER_REGISTRY_API_TOKEN=$(kamal secrets extract GITHUB_CONTAINER_REGISTRY_API_TOKEN $SECRETS) +SECRETS=$(kamal secrets fetch --adapter bitwarden --account s.verna@datocms.com CONTAINER_REGISTRY_API_TOKEN) +CONTAINER_REGISTRY_API_TOKEN=$(kamal secrets extract CONTAINER_REGISTRY_API_TOKEN $SECRETS) diff --git a/.kamal/secrets.staging b/.kamal/secrets.staging index b62cd697..20268aab 100644 --- a/.kamal/secrets.staging +++ b/.kamal/secrets.staging @@ -11,5 +11,5 @@ ROLLBAR_TOKEN=$(echo $KAVO_SECRETS | base64 --decode | sed -n 's/^ROLLBAR_TOKEN= SECRET_API_TOKEN=$(echo $KAVO_SECRETS | base64 --decode | sed -n 's/^SECRET_API_TOKEN=//p') SLACK_TOKEN=$(echo $KAVO_SECRETS | base64 --decode | sed -n 's/^SLACK_TOKEN=//p') -SECRETS=$(kamal secrets fetch --adapter bitwarden --account s.verna@datocms.com GITHUB_CONTAINER_REGISTRY_API_TOKEN) -GITHUB_CONTAINER_REGISTRY_API_TOKEN=$(kamal secrets extract GITHUB_CONTAINER_REGISTRY_API_TOKEN $SECRETS) +SECRETS=$(kamal secrets fetch --adapter bitwarden --account s.verna@datocms.com CONTAINER_REGISTRY_API_TOKEN) +CONTAINER_REGISTRY_API_TOKEN=$(kamal secrets extract CONTAINER_REGISTRY_API_TOKEN $SECRETS) diff --git a/config/deploy.yml b/config/deploy.yml index bac20688..d88e0296 100644 --- a/config/deploy.yml +++ b/config/deploy.yml @@ -6,7 +6,7 @@ registry: server: ghcr.io username: datocms password: - - GITHUB_CONTAINER_REGISTRY_API_TOKEN + - CONTAINER_REGISTRY_API_TOKEN servers: web: