Skip to content

Commit

Permalink
👷 ci: test build
Browse files Browse the repository at this point in the history
  • Loading branch information
megasanjay committed Nov 14, 2024
1 parent 10b144d commit 7530096
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ jobs:

env:
DOCKER_BUILDKIT: 1
KAMAL_REGISTRY_USERNAME: ${{ secrets.KAMAL_REGISTRY_USERNAME }}
KAMAL_REGISTRY_PASSWORD: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}
KAMAL_REGISTRY_LOGIN_SERVER: ${{ secrets.KAMAL_REGISTRY_LOGIN_SERVER }}
KAMAL_SERVER_IP: ${{ secrets.KAMAL_SERVER_IP }}
APP_ID: ${{ secrets.APP_ID }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
Expand Down Expand Up @@ -54,11 +56,11 @@ jobs:
mv Dockerfile.staging Dockerfile
mv config/deploy-staging.yml config/deploy.yml
- name: Login to Github Container Registry
uses: docker/login-action@v3
- name: Login to Azure Container Registry
uses: azure/docker-login@v1
with:
registry: ghcr.io
username: megasanjay
login-server: ${{ secrets.KAMAL_REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.KAMAL_REGISTRY_USERNAME }}
password: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}

- name: Set up Docker Buildx for cache
Expand Down
2 changes: 2 additions & 0 deletions bot/.kamal/secrets
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

# Option 1: Read secrets from the environment
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
KAMAL_REGISTRY_USERNAME=$KAMAL_REGISTRY_USERNAME
KAMAL_REGISTRY_LOGIN_SERVER=$KAMAL_REGISTRY_LOGIN_SERVER

APP_ID=$APP_ID
DATABASE_URL=$DATABASE_URL
Expand Down
6 changes: 3 additions & 3 deletions bot/config/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
service: codefair-bot

# Name of the container image.
image: megasanjay/codefair-bot
image: <%= ENV["KAMAL_REGISTRY_LOGIN_SERVER"] %>/codefair-bot

# Deploy to these servers.
servers:
Expand All @@ -28,8 +28,8 @@ proxy:
registry:
# Specify the registry server, if you're not using Docker Hub
# server: registry.digitalocean.com / ghcr.io / ...
server: https://ghcr.io
username: megasanjay
server: <%= ENV["KAMAL_REGISTRY_LOGIN_SERVER"] %>
username: <%= ENV["KAMAL_REGISTRY_USERNAME"] %>

# Always use an access token rather than real password (pulled from .kamal/secrets).
password:
Expand Down

0 comments on commit 7530096

Please sign in to comment.