mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-27 03:26:22 +08:00
feature (arch): multi arch build
This commit is contained in:
50
.github/workflows/ci.yml
vendored
50
.github/workflows/ci.yml
vendored
@ -168,13 +168,30 @@ jobs:
|
||||
node servers/webdav.js > /dev/null &
|
||||
npm test
|
||||
|
||||
release_docker:
|
||||
release_docker_amd64:
|
||||
if: github.ref == 'refs/heads/master'
|
||||
needs: [ test_e2e, test_backend, test_frontend ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Init
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Run
|
||||
run: |
|
||||
docker build -t machines/filestash:latest-amd64 ./docker/
|
||||
docker push machines/filestash:latest-amd64
|
||||
|
||||
release_docker_arm64:
|
||||
if: github.ref == 'refs/heads/master'
|
||||
needs: [ test_e2e, test_backend, test_frontend ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Init
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
@ -183,13 +200,32 @@ jobs:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Run
|
||||
run: |
|
||||
export COMMIT_SHA=`git rev-parse --short HEAD`
|
||||
docker buildx build --platform linux/arm/v7,linux/arm64,linux/amd64 \
|
||||
-t machines/filestash:latest -t machines/filestash:$COMMIT_SHA \
|
||||
--push ./docker/
|
||||
uname -m
|
||||
uname -a
|
||||
docker version
|
||||
# docker build -t machines/filestash:latest-arm64 ./docker/
|
||||
# echo "DONE"
|
||||
|
||||
release_docker:
|
||||
needs: [ release_docker_amd64, release_docker_arm64 ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Init
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Run
|
||||
run: |
|
||||
docker manifest create machines/filestash:latest \
|
||||
--amend machines/filestash:latest-amd64 \
|
||||
--amend machines/filestash:latest-arm64v8
|
||||
docker manifest push machines/filestash:latest
|
||||
|
||||
deploy:
|
||||
if: github.ref == 'refs/heads/master'
|
||||
|
||||
@ -9,7 +9,7 @@ FROM node:18-alpine AS builder_frontend
|
||||
WORKDIR /home/
|
||||
COPY --from=builder_prepare /home/filestash/ ./
|
||||
RUN apk add make git && \
|
||||
npm install --silent --legacy-peer-deps && \
|
||||
npm install --legacy-peer-deps && \
|
||||
make build_frontend
|
||||
|
||||
# STEP3: BUILD THE BACKEND
|
||||
|
||||
Reference in New Issue
Block a user