fix: workaround npm multi-platform build bug
Some checks failed
Build and push Docker image / build (push) Failing after 1m26s
Update changelog / changelog (push) Has been cancelled
Release new version / release (push) Has been cancelled

rolls back build CI/CD to ARM64-only
This commit is contained in:
2026-01-20 22:14:03 +01:00
parent 0afbdaf7f8
commit f2948eeebe
2 changed files with 17 additions and 25 deletions

View File

@@ -17,12 +17,6 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
- name: Login to registry - name: Login to registry
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
@@ -30,28 +24,23 @@ jobs:
username: ${{ secrets.REGISTRY_USER }} username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }} password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Set outputs - name: Build Docker image
id: vars env:
REF_NAME: ${{ github.ref_name }}
run: |
# Build the image with the commit hash tag
docker build --build-arg BUILD_IDENTIFIER=${REF_NAME} -t gitea.7o7.cx/kittyteam/kittyfe:master-${REF_NAME} .
# Tag the same image as "latest"
docker tag gitea.7o7.cx/kittyteam/kittyfe:master-${REF_NAME} gitea.7o7.cx/kittyteam/kittyfe:latest
- name: Push Docker images
env: env:
BRANCH_NAME: ${{ github.ref_name }} BRANCH_NAME: ${{ github.ref_name }}
SHORT_HASH: ${{ github.sha }}
run: | run: |
#echo branch_name="$BRANCH_NAME" | tee -a $GITHUB_OUTPUT docker push gitea.7o7.cx/kittyteam/kittyfe:master-${REF_NAME}
#echo short_hash=$(git rev-parse --short HEAD) | tee -a $GITHUB_OUTPUT docker push gitea.7o7.cx/kittyteam/kittyfe:latest
echo current_tag=$GITHUB_REF_NAME | tee -a $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: |
linux/amd64
linux/arm64
pull: true
push: true
# Change when working on a different branch!
tags: |
gitea.7o7.cx/kittyteam/kittyfe:${{ steps.vars.outputs.current_tag }}
gitea.7o7.cx/kittyteam/kittyfe:latest
- name: Log out from registry - name: Log out from registry
if: always() if: always()

View File

@@ -24,4 +24,7 @@ USER nodejs
EXPOSE 6568 EXPOSE 6568
# Since we don't know user's .env ahead of time, kittyFE needs to
# rebuild itself every launch so that the changes in .env get reflected.
# This is not ideal and we're looking into possible ways to improve this.
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "6568"] CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "6568"]