ci: avoid qemu on local runners
This commit is contained in:
13
.github/workflows/docker.yml
vendored
13
.github/workflows/docker.yml
vendored
@@ -19,7 +19,18 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||
|
||||
- name: Select Docker platforms
|
||||
id: docker-platforms
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${ACT:-}" = "true" ] || [ "${GITEA_ACTIONS:-}" = "true" ]; then
|
||||
echo "platforms=linux/amd64" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "platforms=linux/amd64,linux/arm64" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Set up QEMU
|
||||
if: ${{ steps.docker-platforms.outputs.platforms != 'linux/amd64' }}
|
||||
uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
@@ -31,7 +42,7 @@ jobs:
|
||||
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
platforms: ${{ steps.docker-platforms.outputs.platforms }}
|
||||
push: false
|
||||
build-args: |
|
||||
GIT_SHA=${{ github.sha }}
|
||||
|
||||
Reference in New Issue
Block a user