44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
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}
|