Add CI workflow
This commit is contained in:
40
.gitea/workflows/ci.yml
Normal file
40
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
- name: Install Rust Toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
- name: Enable Smart Caching
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
- name: Run tests
|
||||||
|
run: cargo test
|
||||||
|
build:
|
||||||
|
name: Build and Push
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: test
|
||||||
|
steps:
|
||||||
|
- name: Login to Local Docker Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: registry.leaf.home.kappeh.org
|
||||||
|
username: ${{ vars.LOCAL_DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.LOCAL_DOCKER_PASSWORD }}
|
||||||
|
logout: true
|
||||||
|
- name: Build and Push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: registry.leaf.home.kappeh.org/kappeh/minecraft_schematics_web:latest
|
||||||
|
|
||||||
Reference in New Issue
Block a user