Skip to content

Commit

Permalink
fix: fix docker build on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzzy committed Nov 19, 2024
1 parent eb0ade2 commit c79689b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,19 @@ jobs:
run: npm run build

# Docker build and push
# Log in to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# Build and push Docker image
- name: Build and Push Docker Image
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
docker build -t $DOCKER_USERNAME/fxql:${{ github.sha }} -t $DOCKER_USERNAME/fxql:latest .
docker push $DOCKER_USERNAME/fxql:${{ github.sha }}
docker push $DOCKER_USERNAME/fxql:latest
docker build -t ${{ secrets.DOCKER_USERNAME }}/fxql:${{ github.sha }} -t ${{ secrets.DOCKER_USERNAME }}/fxql:latest .
docker push ${{ secrets.DOCKER_USERNAME }}/fxql:${{ github.sha }}
docker push ${{ secrets.DOCKER_USERNAME }}/fxql:latest
# Deploy to Railway
- name: Deploy to Railway
Expand Down

0 comments on commit c79689b

Please sign in to comment.