chore(test): close connection to avoid open handle #513
Workflow file for this run
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
| name: Build and push docker image | |
| on: [push] | |
| env: | |
| DOCKER_REPO: ${{ secrets.DOCKER_USERNAME }}/hawk-workers | |
| jobs: | |
| build: | |
| runs-on: ubuntu-20.04 | |
| if: endsWith(github.ref, '/prod') || endsWith(github.ref, '/stage') || endsWith(github.ref, '/migration') | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v1 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v1 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build and push production image | |
| if: endsWith(github.ref, '/prod') | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| tags: ${{ env.DOCKER_REPO }}:prod | |
| push: ${{ endsWith(github.ref, '/prod') }} | |
| - name: Build and push stage image | |
| if: endsWith(github.ref, '/stage') | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: . | |
| file: ./stage.Dockerfile | |
| tags: ${{ env.DOCKER_REPO }}:stage | |
| push: ${{ endsWith(github.ref, '/stage') }} | |
| - name: Build and push migration image | |
| if: endsWith(github.ref, '/migration') | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: . | |
| file: ./stage.Dockerfile | |
| tags: ${{ env.DOCKER_REPO }}:migration | |
| push: ${{ endsWith(github.ref, '/migration') }} |