fileserver/.gitea/workflows/build.yaml
Mutzi 9de4ff8c93
Some checks failed
/ Build backend-glibc (push) Successful in 6m26s
/ Build backend-muslc (push) Successful in 5m42s
/ Build frontend (push) Successful in 2m6s
/ Package builds (push) Failing after 11s
Fix CI
2023-05-28 15:16:08 +02:00

107 lines
3.0 KiB
YAML

on:
- push
- workflow-call
env:
ACTIONS_STEP_DEBUG: true
jobs:
build-glibc:
name: Build backend-glibc
runs-on: 'docker'
container:
image: rust:bullseye
steps:
- run: apt-get update
- run: apt-get install git nodejs -y
- uses: actions/checkout@v3
- name: Build
run: cargo build --release
working-directory: backend
- name: Upload executable
uses: actions/upload-artifact@v3
with:
name: backend-glibc
path: backend/target/release/backend_rust
build-muslc:
name: Build backend-muslc
runs-on: 'docker'
container:
image: rust:alpine
steps:
- name: Install dependencies
run: apk add pkgconf musl-dev git nodejs
- uses: actions/checkout@v3
- name: Build
run: cargo build --release
working-directory: backend
- name: Upload executable
uses: actions/upload-artifact@v3
with:
name: backend-muslc
path: backend/target/release/backend_rust
build-frontend:
name: Build frontend
runs-on: 'docker'
container:
image: node:current-alpine
steps:
- run: apk add git tar
- uses: actions/checkout@v3
- name: Install packages
run: yarn install --frozen-lockfile
working-directory: frontend
- name: Lint
run: yarn lint
working-directory: frontend
- name: Build
run: yarn build
working-directory: frontend
- run: tar -cf ../frontend.tar *
working-directory: frontend/dist
- name: Upload frontend
uses: actions/upload-artifact@v3
with:
name: frontend.tar
path: frontend/frontend.tar
package:
name: Package builds
runs-on: 'docker'
container:
image: node:current-alpine
needs: [build-glibc, build-muslc, build-frontend]
steps:
- name: Install packages
run: apk add tar xz
- run: mkdir static
- name: Download frontend
uses: https://github.com/actions/download-artifact@v3
with:
name: frontend.tar
path: static/frontend.tar
- run: tar -xf frontend.tar && rm frontend.tar
working-directory: static
- name: Download backend-glibc
uses: https://github.com/actions/download-artifact@v3
with:
name: backend-glibc
path: server
- name: Package backend-glibc
run: tar -cvJf linux-x64-glibc.tar.xz server static
- name: Upload package-glibc
uses: actions/upload-artifact@v3
with:
name: linux-x64-glibc.tar.xz
path: linux-x64-glibc.tar.xz
- name: Download backend-muslc
uses: https://github.com/actions/download-artifact@v3
with:
name: backend-muslc
path: server
- name: Package backend-muslc
run: tar -cvJf linux-x64-muslc.tar.xz server static
- name: Upload package-muslc
uses: actions/upload-artifact@v3
with:
name: linux-x64-muslc.tar.xz
path: linux-x64-muslc.tar.xz