Merge branch 'master' of github.com:RealTeamRocket/rocket-app #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'rocket-backend/**' | |
| - 'website/**' | |
| workflow_dispatch: | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout Code | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # Log in to Docker Hub | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PAT }} | |
| # Set up Docker Buildx | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| # Build and Push Backend Image | |
| - name: Build and Push Backend Image | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: ./rocket-backend | |
| push: true | |
| tags: ${{ secrets.DOCKER_USERNAME }}/rocket-backend:latest | |
| # Build and Push Website Image | |
| - name: Build and Push Website Image | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: ./website | |
| file: ./website/Dockerfile | |
| push: true | |
| tags: ${{ secrets.DOCKER_USERNAME }}/rocket-website:latest |