Merge pull request #10 from yoni13/patch-1

Add support for arm64/arm container
This commit is contained in:
KoriIku 2024-10-09 19:47:57 +08:00 committed by GitHub
commit a372c6d4cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,11 +21,17 @@ jobs:
node-version: 20
cache: 'pnpm'
- run: pnpm install && pnpm build
- name: Build image
run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
- name: Set up QEMU for multi-architecture builds
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image
- name: Build and Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
@ -34,5 +40,6 @@ jobs:
[ "$VERSION" == "main" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
docker buildx build --push \
--tag $IMAGE_ID:$VERSION \
--platform linux/amd64,linux/arm/v7,linux/arm64 .