fix: workaround npm multi-platform build bug
rolls back build CI/CD to ARM64-only
This commit is contained in:
@@ -17,12 +17,6 @@ jobs:
|
||||
- name: Checkout repository
|
||||
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
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
@@ -30,28 +24,23 @@ jobs:
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Set outputs
|
||||
id: vars
|
||||
- name: Build Docker image
|
||||
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:
|
||||
BRANCH_NAME: ${{ github.ref_name }}
|
||||
SHORT_HASH: ${{ github.sha }}
|
||||
run: |
|
||||
#echo branch_name="$BRANCH_NAME" | tee -a $GITHUB_OUTPUT
|
||||
#echo short_hash=$(git rev-parse --short HEAD) | tee -a $GITHUB_OUTPUT
|
||||
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
|
||||
docker push gitea.7o7.cx/kittyteam/kittyfe:master-${REF_NAME}
|
||||
docker push gitea.7o7.cx/kittyteam/kittyfe:latest
|
||||
|
||||
- name: Log out from registry
|
||||
if: always()
|
||||
|
||||
@@ -24,4 +24,7 @@ USER nodejs
|
||||
|
||||
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"]
|
||||
|
||||
Reference in New Issue
Block a user