fixing ci

This commit is contained in:
Andy Pack 2024-02-01 18:21:02 +00:00
parent a47d6b4320
commit 501e1d6fb4
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7
2 changed files with 24 additions and 10 deletions

View File

@ -8,10 +8,9 @@ env:
CARGO_TERM_COLOR: always
jobs:
build:
build-web:
runs-on: ubuntu-latest
name: Build WASM
steps:
- uses: actions/checkout@v2
@ -19,9 +18,11 @@ jobs:
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Test WASM in-browser
working-directory: ./draught_web
run: wasm-pack test --firefox --chrome --headless
- name: Build Rust for WASM
working-directory: ./draught_web
run: wasm-pack build --release
- name: Install Node
@ -31,11 +32,11 @@ jobs:
- name: Install Node Modules
run: npm ci
working-directory: ./www
working-directory: ./draught_web/www
- name: Build Js
run: npm run build --if-present
working-directory: ./www
working-directory: ./draught_web/www
- name: Build Docs
run: cargo doc --no-deps --document-private-items
@ -52,12 +53,20 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./www/dist
package:
build:
runs-on: ubuntu-latest
name: Build Native
steps:
- uses: actions/checkout@v2
- name: Build Binary
run: cargo build
working-directory: ./draught
package:
runs-on: ubuntu-latest
needs: [build] # for ignoring bad builds
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
@ -73,5 +82,7 @@ jobs:
- name: Build & Push Container
uses: docker/build-push-action@v2
with:
file: ./draught_web/Dockerfile
context: ./draught_web
push: true
tags: sarsoo/draught:latest

View File

@ -6,9 +6,12 @@ pipeline {
when { branch 'master' }
steps {
script {
docker.withRegistry('https://registry.sarsoo.xyz', 'git-registry-creds') {
docker.build("sarsoo/draught:latest").push()
dir('draught_web')
{
docker.withRegistry('https://registry.sarsoo.xyz', 'git-registry-creds')
{
docker.build("sarsoo/draught:latest").push()
}
}
}
}