Add .forgejo/workflows/build.yaml
Some checks failed
Trigger CI Pipeline / dispatch (push) Failing after 20s
Some checks failed
Trigger CI Pipeline / dispatch (push) Failing after 20s
This commit is contained in:
parent
f6435f7496
commit
7e7190197e
1 changed files with 44 additions and 0 deletions
44
.forgejo/workflows/build.yaml
Normal file
44
.forgejo/workflows/build.yaml
Normal file
|
|
@ -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}
|
||||
Loading…
Add table
Reference in a new issue