diff --git a/.github/workflows/continous-integration.yml b/.github/workflows/continous-integration.yml index 5f5865445608..befe0345e95a 100644 --- a/.github/workflows/continous-integration.yml +++ b/.github/workflows/continous-integration.yml @@ -823,9 +823,7 @@ jobs: image_tag: ${{ steps.set_output.outputs.image_tag }} # Return 'true' if tag version is equal or higher than the latest tagged Rasa version is_newest_version: ${{ steps.rasa_get_version.outputs.is_newest_version }} - strategy: - matrix: - arch: [linux/amd64, linux/arm64] + steps: # Due to an issue with checking out a wrong commit, we make sure # to checkout HEAD commit for a pull request. @@ -841,7 +839,7 @@ jobs: if: github.event_name != 'pull_request' - name: Set up QEMU - uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 + uses: docker/setup-qemu-action@v2 - name: Read Poetry Version 🔢 run: | @@ -849,10 +847,7 @@ jobs: shell: bash - name: Set up Docker Buildx - uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c - with: - version: v0.5.1 - driver: docker + uses: docker/setup-buildx-action@v2 - name: Login to DockerHub Registry 🔢 run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ env.DOCKERHUB_USERNAME }} --password-stdin || true @@ -912,51 +907,51 @@ jobs: if: steps.check_image.outputs.base_exists == 'false' || env.IS_TAG_BUILD == 'true' run: | export IMAGE_TAG=${{ steps.check_image.outputs.base_image_hash }} - docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl base + docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl base - name: Push Docker base image if it's not building from a fork ⬆ if: (steps.check_image.outputs.base_exists == 'false' || env.IS_TAG_BUILD == 'true') && github.event.pull_request.head.repo.owner.login == 'RasaHQ' run: | export IMAGE_TAG=${{ steps.check_image.outputs.base_image_hash }} - docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl base --push + docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl base --push - name: Build Docker mitie base image 🛠 if: steps.check_image.outputs.base_mitie_exists == 'false' || steps.check_image.outputs.base_exists == 'false' run: | export IMAGE_TAG=${{ steps.check_image.outputs.base_mitie_image_hash }} - docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl base-mitie + docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl base-mitie - name: Push Docker mitie base image if it's not building from a fork ⬆ if: (steps.check_image.outputs.base_mitie_exists == 'false' || steps.check_image.outputs.base_exists == 'false') && github.event.pull_request.head.repo.owner.login == 'RasaHQ' run: | export IMAGE_TAG=${{ steps.check_image.outputs.base_mitie_image_hash }} - docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl base-mitie --push + docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl base-mitie --push - name: Build Docker poetry base image 🛠 if: steps.check_image.outputs.base_poetry_exists == 'false' || steps.check_image.outputs.base_exists == 'false' run: | export IMAGE_TAG=${{ env.POETRY_VERSION }} export BASE_IMAGE_HASH=${{ steps.check_image.outputs.base_image_hash }} - docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl base-poetry + docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl base-poetry - name: Push Docker poetry base image if it's not building from a fork ⬆ if: (steps.check_image.outputs.base_poetry_exists == 'false' || steps.check_image.outputs.base_exists == 'false') && github.event.pull_request.head.repo.owner.login == 'RasaHQ' run: | export IMAGE_TAG=${{ env.POETRY_VERSION }} export BASE_IMAGE_HASH=${{ steps.check_image.outputs.base_image_hash }} - docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl base-poetry --push + docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl base-poetry --push - name: Build Docker builder base image 🛠 if: steps.check_image.outputs.base_builder_exists == 'false' || steps.check_image.outputs.base_exists == 'false' run: | export IMAGE_TAG=${{ steps.check_image.outputs.base_builder_image_hash }} - docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl base-builder + docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl base-builder - name: Push Docker builder base image if it's not building from a fork ⬆ if: (steps.check_image.outputs.base_builder_exists == 'false' || steps.check_image.outputs.base_exists == 'false') && github.event.pull_request.head.repo.owner.login == 'RasaHQ' run: | export IMAGE_TAG=${{ steps.check_image.outputs.base_builder_image_hash }} - docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl base-builder --push + docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl base-builder --push # Set environment variables for a pull request # @@ -1013,7 +1008,6 @@ jobs: strategy: matrix: image: [default, full, mitie-en, spacy-de, spacy-it, spacy-en] - arch: [linux/amd64, linux/arm64] steps: # Due to an issue with checking out a wrong commit, we make sure @@ -1030,7 +1024,7 @@ jobs: if: github.event_name != 'pull_request' - name: Set up QEMU - uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 + uses: docker/setup-qemu-action@v2 - name: Free disk space if: needs.changes.outputs.docker == 'true' @@ -1049,11 +1043,7 @@ jobs: shell: bash - name: Set up Docker Buildx - uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c - id: buildx - with: - version: v0.5.1 - driver: docker + uses: docker/setup-buildx-action@v2 - name: Echo Available platforms run: echo ${{ steps.buildx.outputs.platforms }} @@ -1073,19 +1063,19 @@ jobs: - name: Build Docker image if: needs.changes.outputs.docker == 'true' run: | - docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl ${{ matrix.image }} + docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl ${{ matrix.image }} - name: Push image with main tag 📦 if: needs.changes.outputs.docker == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'RasaHQ/rasa' run: | - docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl ${{ matrix.image }} --push + docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl ${{ matrix.image }} --push - name: Push image with ${{github.ref}} tag 📦 if: needs.changes.outputs.docker == 'true' && github.event_name == 'push' && env.IS_TAG_BUILD == 'true' && github.repository == 'RasaHQ/rasa' run: | IS_NEWEST_VERSION=${{ needs.build_docker_base_images_and_set_env.outputs.is_newest_version }} - docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl ${{ matrix.image }} --push + docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl ${{ matrix.image }} --push # Tag the image as latest if [[ "${IS_NEWEST_VERSION}" == "true" ]]; then