From 7e7190197ed1afb72e04b9c097a3cc317dd547d9 Mon Sep 17 00:00:00 2001 From: ember Date: Mon, 16 Mar 2026 16:30:16 +0000 Subject: [PATCH] Add .forgejo/workflows/build.yaml --- .forgejo/workflows/build.yaml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .forgejo/workflows/build.yaml diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml new file mode 100644 index 0000000..4791e4f --- /dev/null +++ b/.forgejo/workflows/build.yaml @@ -0,0 +1,44 @@ +name: Build and Push Continuwuity + +on: + repository_dispatch: + types: [continuwuity-push] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout Continuwuity + uses: actions/checkout@v4 + with: + repository: ember/continuwuity + ref: ${{ github.event.client_payload.ref || 'main' }} + + - name: Install Rust + uses: https://github.com/dtolnay/rust-toolchain@stable + + - name: Run tests + run: cargo test --workspace + + build-and-push: + runs-on: ubuntu-latest + needs: test + steps: + - name: Checkout Continuwuity + uses: actions/checkout@v4 + with: + repository: ember/continuwuity + ref: ${{ github.event.client_payload.ref || 'main' }} + + - name: Build container image + run: | + SHA=${{ github.event.client_payload.sha || 'latest' }} + docker build -t 10.70.69.22:30500/ember/continuwuity:latest \ + -t 10.70.69.22:30500/ember/continuwuity:${SHA} \ + -f docker/Dockerfile . + + - name: Push to Zot + run: | + SHA=${{ github.event.client_payload.sha || 'latest' }} + docker push 10.70.69.22:30500/ember/continuwuity:latest + docker push 10.70.69.22:30500/ember/continuwuity:${SHA}