fix(playwright): reset cleanup state at start of _afterSuite to preve… #1311
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 upon release | |
| on: | |
| push: | |
| branches: | |
| - 4.x | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| push_to_registry: | |
| name: Build and push Docker image to Docker Hub | |
| runs-on: ubuntu-22.04 | |
| env: | |
| DOCKER_REPO: ${{ secrets.DOCKERHUB_REPOSITORY }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get version from package.json | |
| id: get_version | |
| run: | | |
| VERSION=$(jq -r .version package.json) | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - name: Check if Docker tag exists on Docker Hub | |
| id: tag_check | |
| run: | | |
| STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ | |
| https://hub.docker.com/v2/repositories/${{ env.DOCKER_REPO }}/tags/${{ steps.get_version.outputs.version }}/) | |
| echo "status_code=$STATUS_CODE" >> $GITHUB_OUTPUT | |
| - name: Build and push Docker image | |
| if: steps.tag_check.outputs.status_code != '200' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| tags: | | |
| ${{ env.DOCKER_REPO }}:latest | |
| ${{ env.DOCKER_REPO }}:${{ env.VERSION }} |