From 85cd0c4b7aa8ba23fbd4baee6e443bc3de7fa1be Mon Sep 17 00:00:00 2001 From: Anca Lita <27920906+ancalita@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:39:37 +0100 Subject: [PATCH 1/7] add support for ARM arch --- .github/workflows/continuous-integration.yml | 8 ++------ .github/workflows/rasa-sdk-dev-docker-image.yml | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 5b0a5c1df..0f8e5c60d 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -240,21 +240,17 @@ jobs: run: | echo "IMAGE_TAG=${{ needs.build_docker_image_set_env.outputs.image_tag }}" >> $GITHUB_ENV - - name: Build Docker image - run: | - docker buildx bake --load - - name: Login to Docker Hub Registry 🔢 if: github.event_name == 'push' && env.IS_TAG_BUILD == 'true' && github.repository == 'RasaHQ/rasa-sdk' run: echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin || true - - name: Push Docker image 📦 + - name: Build and Push Docker image 📦 if: github.event_name == 'push' && env.IS_TAG_BUILD == 'true' && github.repository == 'RasaHQ/rasa-sdk' run: | IS_NEWEST_VERSION=${{ needs.build_docker_image_set_env.outputs.is_newest_version }} # Push image - docker push rasa/rasa-sdk:${IMAGE_TAG} + IMAGE_TAG=${IMAGE_TAG} docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker-bake.hcl default --push # Tag the image as latest if [[ "${IS_NEWEST_VERSION}" == "true" ]]; then diff --git a/.github/workflows/rasa-sdk-dev-docker-image.yml b/.github/workflows/rasa-sdk-dev-docker-image.yml index a6fb5ca19..8d0b443c4 100644 --- a/.github/workflows/rasa-sdk-dev-docker-image.yml +++ b/.github/workflows/rasa-sdk-dev-docker-image.yml @@ -52,7 +52,7 @@ jobs: - name: Build docker image run: | - docker buildx bake --load + docker buildx bake --set *.platform=linux/amd64,linux/arm64 --load - name: Tag and push docker image to AWS run: | From efe5d27e311ee2dab1430cd998835d53b69336be Mon Sep 17 00:00:00 2001 From: Anca Lita <27920906+ancalita@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:42:44 +0100 Subject: [PATCH 2/7] add changelog entry --- changelog/1123.misc.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/1123.misc.md diff --git a/changelog/1123.misc.md b/changelog/1123.misc.md new file mode 100644 index 000000000..8ad9b5840 --- /dev/null +++ b/changelog/1123.misc.md @@ -0,0 +1 @@ +Add support for ARM architecture in the `rasa-sdk` Docker image build. From 869393573b3bcb09068ca9f9ab9f3cc054c0a26d Mon Sep 17 00:00:00 2001 From: Anca Lita <27920906+ancalita@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:13:20 +0100 Subject: [PATCH 3/7] trigger dev image build on PR --- .github/workflows/rasa-sdk-dev-docker-image.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rasa-sdk-dev-docker-image.yml b/.github/workflows/rasa-sdk-dev-docker-image.yml index 8d0b443c4..7b3a90519 100644 --- a/.github/workflows/rasa-sdk-dev-docker-image.yml +++ b/.github/workflows/rasa-sdk-dev-docker-image.yml @@ -5,6 +5,7 @@ on: # Run cron job at 8AM Monday to Sunday. - cron: '0 8 * * *' workflow_dispatch: + pull_request: env: AWS_REGION: us-east-1 From 755c3cf71c7f36d84478fc6fa0cd952bfcbdfd42 Mon Sep 17 00:00:00 2001 From: Anca Lita <27920906+ancalita@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:24:07 +0100 Subject: [PATCH 4/7] remove docker driver from dev image workflow --- .github/workflows/rasa-sdk-dev-docker-image.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rasa-sdk-dev-docker-image.yml b/.github/workflows/rasa-sdk-dev-docker-image.yml index 7b3a90519..7b9b3acbd 100644 --- a/.github/workflows/rasa-sdk-dev-docker-image.yml +++ b/.github/workflows/rasa-sdk-dev-docker-image.yml @@ -49,7 +49,6 @@ jobs: uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c with: version: v0.5.1 - driver: docker - name: Build docker image run: | From 93e71cb4efa53a94cb73c1898d42b52189ce28bd Mon Sep 17 00:00:00 2001 From: Anca Lita <27920906+ancalita@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:56:29 +0100 Subject: [PATCH 5/7] use --push instead of load flag --- .github/workflows/rasa-sdk-dev-docker-image.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rasa-sdk-dev-docker-image.yml b/.github/workflows/rasa-sdk-dev-docker-image.yml index 7b9b3acbd..60e830f79 100644 --- a/.github/workflows/rasa-sdk-dev-docker-image.yml +++ b/.github/workflows/rasa-sdk-dev-docker-image.yml @@ -50,11 +50,6 @@ jobs: with: version: v0.5.1 - - name: Build docker image + - name: Build and push docker image to AWS run: | - docker buildx bake --set *.platform=linux/amd64,linux/arm64 --load - - - name: Tag and push docker image to AWS - run: | - docker tag rasa/rasa-sdk:main $REPOSITORY:latest - docker push $REPOSITORY:latest + docker buildx bake --set *.platform=linux/amd64,linux/arm64 --set tags=$REPOSITORY:latest --push From 3f8e6f0bf94159323f6bfc3f283fd1258b2a1cd2 Mon Sep 17 00:00:00 2001 From: Anca Lita <27920906+ancalita@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:59:34 +0100 Subject: [PATCH 6/7] update override flag --- .github/workflows/rasa-sdk-dev-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rasa-sdk-dev-docker-image.yml b/.github/workflows/rasa-sdk-dev-docker-image.yml index 60e830f79..0bbb69a1c 100644 --- a/.github/workflows/rasa-sdk-dev-docker-image.yml +++ b/.github/workflows/rasa-sdk-dev-docker-image.yml @@ -52,4 +52,4 @@ jobs: - name: Build and push docker image to AWS run: | - docker buildx bake --set *.platform=linux/amd64,linux/arm64 --set tags=$REPOSITORY:latest --push + docker buildx bake --set *.platform=linux/amd64,linux/arm64 --set target.default.tags=$REPOSITORY:latest --push From cb4ac029deb465a48bf5a9559dda6afe5d3a0ee7 Mon Sep 17 00:00:00 2001 From: Anca Lita <27920906+ancalita@users.noreply.github.com> Date: Tue, 9 Jul 2024 12:01:32 +0100 Subject: [PATCH 7/7] remove target from override flag --- .github/workflows/rasa-sdk-dev-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rasa-sdk-dev-docker-image.yml b/.github/workflows/rasa-sdk-dev-docker-image.yml index 0bbb69a1c..49ffb5f4f 100644 --- a/.github/workflows/rasa-sdk-dev-docker-image.yml +++ b/.github/workflows/rasa-sdk-dev-docker-image.yml @@ -52,4 +52,4 @@ jobs: - name: Build and push docker image to AWS run: | - docker buildx bake --set *.platform=linux/amd64,linux/arm64 --set target.default.tags=$REPOSITORY:latest --push + docker buildx bake --set *.platform=linux/amd64,linux/arm64 --set default.tags=$REPOSITORY:latest --push