mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-27 11:35:04 +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 &
|
node servers/webdav.js > /dev/null &
|
||||||
npm test
|
npm test
|
||||||
|
|
||||||
release_docker:
|
release_docker_amd64:
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
needs: [ test_e2e, test_backend, test_frontend ]
|
needs: [ test_e2e, test_backend, test_frontend ]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Init
|
- 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
|
- name: Setup
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
@ -183,13 +200,32 @@ jobs:
|
|||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Run
|
- name: Run
|
||||||
run: |
|
run: |
|
||||||
export COMMIT_SHA=`git rev-parse --short HEAD`
|
uname -m
|
||||||
docker buildx build --platform linux/arm/v7,linux/arm64,linux/amd64 \
|
uname -a
|
||||||
-t machines/filestash:latest -t machines/filestash:$COMMIT_SHA \
|
docker version
|
||||||
--push ./docker/
|
# 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:
|
deploy:
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
|
|||||||
@ -9,7 +9,7 @@ FROM node:18-alpine AS builder_frontend
|
|||||||
WORKDIR /home/
|
WORKDIR /home/
|
||||||
COPY --from=builder_prepare /home/filestash/ ./
|
COPY --from=builder_prepare /home/filestash/ ./
|
||||||
RUN apk add make git && \
|
RUN apk add make git && \
|
||||||
npm install --silent --legacy-peer-deps && \
|
npm install --legacy-peer-deps && \
|
||||||
make build_frontend
|
make build_frontend
|
||||||
|
|
||||||
# STEP3: BUILD THE BACKEND
|
# STEP3: BUILD THE BACKEND
|
||||||
|
|||||||
Reference in New Issue
Block a user