Skip to content

Commit c984171

Browse files
authored
ci(*): update actions to use docker native action (#393)
This pull request updates the workflow configuration files to improve how QEMU is set up for cross-platform Docker builds. The changes replace the manual QEMU setup command with the `docker/setup-qemu-action@v3` GitHub Action, making the setup more streamlined and consistent. Workflow updates: * [`.github/workflows/llvm-build-bump-pr.yml`](diffhunk://#diff-d608eb75b383338d789a8908995e47499214a7cc55a847771ad73800464b18b0L190-R192): Replaced the manual QEMU setup (`docker run --rm --privileged multiarch/qemu-user-static --reset -p yes`) with the `docker/setup-qemu-action@v3` GitHub Action, specifying the platform using the `matrix.docker.platform` variable. * [`.github/workflows/test-cross-platform.yml`](diffhunk://#diff-290907d9a4bcf13181105b134bd1645da5a3ef27c54f148ad5823e6b77e88426L154-R156): Similarly replaced the manual QEMU setup with the `docker/setup-qemu-action@v3` GitHub Action, ensuring platform compatibility for Docker builds.
1 parent 820af73 commit c984171

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/llvm-build-bump-pr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ jobs:
187187
run: echo ${{ matrix.docker.platform }} ${{ matrix.docker.ubuntu-image }} ${{ matrix.docker.node-name }}
188188

189189
- name: Set up QEMU
190-
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
190+
uses: docker/setup-qemu-action@v3
191+
with:
192+
platforms: linux/${{ matrix.docker.platform }}
191193

192194
# Use the oldest ubuntu image version possible for backward compatibility.
193195
- name: Docker run

.github/workflows/test-cross-platform.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ jobs:
151151
uses: actions/checkout@v4
152152

153153
- name: Set up QEMU
154-
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
154+
uses: docker/setup-qemu-action@v3
155+
with:
156+
platforms: linux/${{ matrix.docker.platform }}
155157

156158
- name: Docker run background
157159
run: docker run -d --name ${{ matrix.docker.node-name }} --platform linux/${{ matrix.docker.platform }} ${{ matrix.docker.ubuntu-image }}/ubuntu:22.04 tail -f /dev/null

0 commit comments

Comments
 (0)