Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoverna committed Dec 13, 2024
1 parent c9bc121 commit af8b742
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ 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
ruby -e 'require "dotenv"; puts ::Dotenv.parse(".kamal/secrets.staging").inspect'
kamal deploy -d $KAMAL_DESTINATION
4 changes: 2 additions & 2 deletions .kamal/secrets.production
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] 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 [email protected] CONTAINER_REGISTRY_API_TOKEN)
CONTAINER_REGISTRY_API_TOKEN=$(kamal secrets extract CONTAINER_REGISTRY_API_TOKEN $SECRETS)
6 changes: 4 additions & 2 deletions .kamal/secrets.staging
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ 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 [email protected] GITHUB_CONTAINER_REGISTRY_API_TOKEN)
GITHUB_CONTAINER_REGISTRY_API_TOKEN=$(kamal secrets extract GITHUB_CONTAINER_REGISTRY_API_TOKEN $SECRETS)
PPP=$PRIVATE_KEY

SECRETS=$(kamal secrets fetch --adapter bitwarden --account [email protected] CONTAINER_REGISTRY_API_TOKEN)
CONTAINER_REGISTRY_API_TOKEN=$(kamal secrets extract CONTAINER_REGISTRY_API_TOKEN $SECRETS)
2 changes: 1 addition & 1 deletion config/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ registry:
server: ghcr.io
username: datocms
password:
- GITHUB_CONTAINER_REGISTRY_API_TOKEN
- CONTAINER_REGISTRY_API_TOKEN

servers:
web:
Expand Down

0 comments on commit af8b742

Please sign in to comment.