Skip to content

Commit d769d0c

Browse files
authored
added buildx setup in workflows, fixed an issue in the build container script (#39)
1 parent f394b66 commit d769d0c

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

Diff for: .github/workflows/docker-stable.yml

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ jobs:
2727
username: ${{ secrets.DOCKERHUB_USERNAME }}
2828
password: ${{ secrets.DOCKERHUB_TOKEN }}
2929

30+
- name: Set up QEMU
31+
uses: docker/setup-qemu-action@v3
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v3
35+
3036
- name: Build & Push Stable Docker
3137
uses: docker/build-push-action@v5
3238
with:

Diff for: .github/workflows/pr-preview.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,22 @@ jobs:
140140
username: ${{ secrets.DOCKERHUB_USERNAME }}
141141
password: ${{ secrets.DOCKERHUB_TOKEN }}
142142

143+
- name: Set up QEMU
144+
uses: docker/setup-qemu-action@v3
145+
146+
- name: Set up Docker Buildx
147+
uses: docker/setup-buildx-action@v3
148+
143149
- name: Build & Push Docker Preview
144150
if: steps.verify_package.outputs.success == 'true'
145151
uses: docker/build-push-action@v5
146152
env:
147153
VERSION: ${{ env.VERSION }}
148154
with:
149155
push: true
150-
tags: socketdev/cli:pr-${{ github.event.pull_request.number }}
156+
platforms: linux/amd64,linux/arm64
157+
tags: |
158+
socketdev/cli:pr-${{ github.event.pull_request.number }}
151159
build-args: |
152160
CLI_VERSION=${{ env.VERSION }}
153161
PIP_INDEX_URL=https://test.pypi.org/simple

Diff for: .github/workflows/release.yml

+6
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ jobs:
6666
username: ${{ secrets.DOCKERHUB_USERNAME }}
6767
password: ${{ secrets.DOCKERHUB_TOKEN }}
6868

69+
- name: Set up QEMU
70+
uses: docker/setup-qemu-action@v3
71+
72+
- name: Set up Docker Buildx
73+
uses: docker/setup-buildx-action@v3
74+
6975
- name: Verify package is installable
7076
id: verify_package
7177
env:

Diff for: scripts/build_container.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ if [ $ENABLE_PYPI_BUILD = "pypi-build=test" ]; then
2626
python -m build --wheel --sdist
2727
twine upload --repository testpypi dist/*$VERSION*
2828
sleep 120
29-
docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:$VERSION . \
30-
&& docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:latest . \
29+
docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:$VERSION-test . \
30+
&& docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:test . \
3131
&& docker push socketdev/cli:$VERSION-test \
3232
&& docker push socketdev/cli:test
3333
fi

0 commit comments

Comments
 (0)