File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7272
7373 - name : Build
7474 run : pnpm build
75+
76+ docker :
77+ name : Build & Push Docker Image
78+ needs : ci
79+ runs-on : ubuntu-latest
80+ # Only push the Docker image when code is merged/pushed to the main branch
81+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
82+
83+ steps :
84+ - name : Checkout
85+ uses : actions/checkout@v4
86+
87+ - name : Set up Docker Buildx
88+ uses : docker/setup-buildx-action@v3
89+
90+ - name : Login to Docker Hub
91+ uses : docker/login-action@v3
92+ with :
93+ username : ${{ secrets.DOCKERHUB_USERNAME }}
94+ password : ${{ secrets.DOCKERHUB_TOKEN }}
95+
96+ - name : Build and push
97+ uses : docker/build-push-action@v5
98+ with :
99+ context : .
100+ push : true
101+ # Tags the image with your Docker Hub username and project name
102+ tags : ${{ secrets.DOCKERHUB_USERNAME }}/ghost-ai:latest,${{ secrets.DOCKERHUB_USERNAME }}/ghost-ai:${{ github.sha }}
103+ # The Dockerfile requires a DATABASE_URL for Prisma generate during build
104+ build-args : |
105+ DATABASE_URL=postgres://dummy:dummy@localhost:5432/dummy
You can’t perform that action at this time.
0 commit comments