mirror of
https://github.com/KoriIku/luxirty-search
synced 2024-11-21 16:18:13 +00:00
Update main.yml
This commit is contained in:
parent
019399b322
commit
2216dc080d
18
.github/workflows/main.yml
vendored
18
.github/workflows/main.yml
vendored
@ -21,26 +21,17 @@ jobs:
|
||||
node-version: 20
|
||||
cache: 'pnpm'
|
||||
- run: pnpm install && pnpm build
|
||||
|
||||
- name: Set up QEMU for multi-architecture builds
|
||||
uses: docker/setup-qemu-action@v2
|
||||
with:
|
||||
platforms: arm64
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Build multi-arch image (including arm64)
|
||||
run: |
|
||||
docker buildx create --use
|
||||
docker buildx build --platform linux/amd64,linux/arm64 . \
|
||||
--file Dockerfile \
|
||||
--tag $IMAGE_NAME \
|
||||
--label "runnumber=${GITHUB_RUN_ID}"
|
||||
|
||||
- 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]')
|
||||
@ -49,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 .
|
||||
|
Loading…
Reference in New Issue
Block a user