-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 2.27 KB
/
docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Docker Image CI
on:
push:
branches: ['Production']
pull_request:
branches: ['Production']
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build the Docker image
run: |
touch apps/bot/.env
echo DISCORD_BOT_TOKEN=${{ secrets.DISCORD_BOT_TOKEN }} >> apps/bot/.env
echo DEV_GUILD_IDS=${{ secrets.DEV_GUILD_IDS }} >> apps/bot/.env
echo SUPPORT_GUILD_INVITE_URL=${{ secrets.SUPPORT_GUILD_INVITE_URL }} >> apps/bot/.env
echo DEPLOY_COMMANDS=${{ secrets.DEPLOY_COMMANDS }} >> apps/bot/.env
echo DEPLOY_ALL_MODULES=${{ secrets.DEPLOY_ALL_MODULES }} >> apps/bot/.env
echo DB_URL=${{ secrets.DB_URL }} >> apps/bot/.env
echo DB_OPTION=${{ secrets.DB_OPTION }} >> apps/bot/.env
echo HOME_URL=${{ secrets.HOME_URL }} >> apps/bot/.env
echo COMMANDS_URL=${{ secrets.COMMANDS_URL }} >> apps/bot/.env
echo DOCS_URL=${{ secrets.DOCS_URL }} >> apps/bot/.env
echo VOTE_URL=${{ secrets.VOTE_URL }} >> apps/bot/.env
touch apps/dashboard/.env
echo DISCORD_BOT_TOKEN=${{ secrets.DISCORD_BOT_TOKEN }} >> apps/dashboard/.env
echo DISCORD_CLIENT_ID=${{ secrets.DISCORD_CLIENT_ID }} >> apps/dashboard/.env
echo DISCORD_CLIENT_SECRET=${{ secrets.DISCORD_CLIENT_SECRET }} >> apps/dashboard/.env
echo NEXTAUTH_SECRET=${{ secrets.NEXTAUTH_SECRET }} >> apps/dashboard/.env
echo NEXTAUTH_URL=${{ secrets.NEXTAUTH_URL }} >> apps/dashboard/.env
echo DB_URL=${{ secrets.DB_URL }} >> apps/dashboard/.env
echo DB_OPTION=${{ secrets.DB_OPTION }} >> apps/dashboard/.env
echo SUPPORT_GUILD_INVITE_URL=${{ secrets.SUPPORT_GUILD_INVITE_URL }} >> apps/dashboard/.env
docker compose -f docker-compose.yml build --no-cache --pull
docker push ${{ secrets.DOCKERHUB_USERNAME }}/economica:bot
docker push ${{ secrets.DOCKERHUB_USERNAME }}/economica:dash