chore: Comment out unused Docker build and container run steps

This commit is contained in:
ogabrielluiz 2024-06-15 11:53:13 -03:00
commit 5a04adfa1f

View file

@ -53,32 +53,31 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker Image
uses: docker/build-push-action@v5
id: docker_build
with:
context: .
push: false # Do not push yet
platforms: "linux/amd64,linux/arm64/v8"
load: true
file: ${{ matrix.file }}
tags: ${{ env.TEST_TAG }}
- name: Run Container
run: |
docker run -d --name test_container -p 8000:8000 ${{ needs.setup.outputs.tags }}
- name: Wait for Container to Start and Check Health
run: |
timeout 40 bash -c 'until curl -f http://127.0.0.1:8000/health; do sleep 1; done' || (echo "Server did not start in time" && docker logs test_container && docker stop test_container && docker rm test_container && exit 1)
- name: Stop and Remove Container
run: |
docker stop test_container
docker rm test_container
# - name: Build Docker Image
# uses: docker/build-push-action@v5
# id: docker_build
# with:
# context: .
# push: false # Do not push yet
# platforms: "linux/amd64,linux/arm64/v8"
# load: true
# file: ${{ matrix.file }}
# tags: ${{ env.TEST_TAG }}
# - name: Run Container
# run: |
# docker run -d --name test_container -p 8000:8000 ${{ needs.setup.outputs.tags }}
# - name: Wait for Container to Start and Check Health
# run: |
# timeout 40 bash -c 'until curl -f http://127.0.0.1:8000/health; do sleep 1; done' || (echo "Server did not start in time" && docker logs test_container && docker stop test_container && docker rm test_container && exit 1)
# - name: Stop and Remove Container
# run: |
# docker stop test_container
# docker rm test_container
- name: Push Docker Image
if: success()
uses: docker/build-push-action@v5
with:
context: .
push: true # Push only if the tests pass
push: true
platforms: "linux/amd64,linux/arm64/v8"
file: ${{ matrix.file }}
tags: ${{ needs.setup.outputs.tags }}