Added arm64 build
This commit is contained in:
19
.github/workflows/build.yaml
vendored
19
.github/workflows/build.yaml
vendored
@@ -24,7 +24,6 @@ jobs:
|
||||
docker:
|
||||
name: Build Dockerfile
|
||||
runs-on: ubuntu-latest
|
||||
container: docker
|
||||
steps:
|
||||
- name: Clone Repository
|
||||
uses: ztimson/actions/clone@develop
|
||||
@@ -32,6 +31,9 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Build Image
|
||||
run: |
|
||||
REGISTRY=$(echo ${{github.server_url}} | sed s%http://%% | sed s%https://%%)
|
||||
@@ -43,6 +45,17 @@ jobs:
|
||||
REGISTRY=$(echo ${{github.server_url}} | sed s%http://%% | sed s%https://%%)
|
||||
docker login -u "${{github.repository_owner}}" -p "${{secrets.DEPLOY_TOKEN}}" "$REGISTRY"
|
||||
docker login -u "${{secrets.DOCKER_HUB_USER}}" -p "${{secrets.DOCKER_HUB_TOKEN}}" docker.io
|
||||
docker buildx build --platform linux/amd64,linux/arm64 -t "$REGISTRY/${{github.repository}}:latest" -t "$REGISTRY/${{github.repository}}:arm64-latest" --push .
|
||||
docker buildx build --platform linux/amd64,linux/arm64 -t "docker.io/ztimson/kiwixm:latest" -t "docker.io/ztimson/kiwixm:arm64-latest" --push .
|
||||
|
||||
# Build and push multi-platform images
|
||||
docker buildx build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
-t "$REGISTRY/${{github.repository}}:latest" \
|
||||
-t "$REGISTRY/${{github.repository}}:arm64-latest" \
|
||||
--push .
|
||||
|
||||
docker buildx build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
-t "docker.io/ztimson/kiwixm:latest" \
|
||||
-t "docker.io/ztimson/kiwixm:arm64-latest" \
|
||||
--push .
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user