Compare commits
24 commits
deployment
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 6606d6dbee | |||
| 226cc6bea2 | |||
| 3b7b383fa7 | |||
| d536847a66 | |||
| cdcb46fa78 | |||
| a4feaf53fe | |||
| 22da285cbf | |||
| 559b2d0f75 | |||
| 15fa9ac30e | |||
| e0d749558c | |||
| 2522197664 | |||
| fb84a108d2 | |||
| 56bfc62e54 | |||
| 86ba80b5f0 | |||
| 825f491e84 | |||
| 97e602c53d | |||
| 2f5c57c08d | |||
| 148173755b | |||
| 039d67f194 | |||
| 35b318a63e | |||
| 8a74ab3d66 | |||
| 8d9645f049 | |||
| 4c61fc7dda | |||
| 7135fad18e |
5 changed files with 121 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
|
|
||||||
- name: Checkout Continuwuity
|
- name: Checkout Continuwuity
|
||||||
run: |
|
run: |
|
||||||
REF=${{ github.event.client_payload.ref || 'main' }}
|
REF=${{ github.event.client_payload.ref || 'deployment' }}
|
||||||
git clone --depth 1 --branch "${REF##refs/heads/}" \
|
git clone --depth 1 --branch "${REF##refs/heads/}" \
|
||||||
http://forgejo.tooling.svc.cluster.local:3000/ember/continuwuity.git .
|
http://forgejo.tooling.svc.cluster.local:3000/ember/continuwuity.git .
|
||||||
|
|
||||||
|
|
@ -3,7 +3,7 @@ name: Trigger CI Pipeline
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- deployment
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dispatch:
|
dispatch:
|
||||||
33
.forgejo/workflows/fluffychat-build.yaml
Normal file
33
.forgejo/workflows/fluffychat-build.yaml
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
name: Build and Push FluffyChat
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
repository_dispatch:
|
||||||
|
types: [fluffychat-push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: docker:cli
|
||||||
|
steps:
|
||||||
|
- name: Install git
|
||||||
|
run: apk add --no-cache git
|
||||||
|
|
||||||
|
- name: Checkout FluffyChat
|
||||||
|
run: |
|
||||||
|
REF=${{ github.event.client_payload.ref || 'deployment' }}
|
||||||
|
git clone --depth 1 --branch "${REF##refs/heads/}" \
|
||||||
|
http://forgejo.tooling.svc.cluster.local:3000/ember/fluffychat.git .
|
||||||
|
|
||||||
|
- name: Build container image
|
||||||
|
run: |
|
||||||
|
SHA=${{ github.event.client_payload.sha || 'latest' }}
|
||||||
|
docker build -t 10.70.69.22:30500/ember/fluffychat:latest \
|
||||||
|
-t 10.70.69.22:30500/ember/fluffychat:${SHA} .
|
||||||
|
|
||||||
|
- name: Push to Zot
|
||||||
|
run: |
|
||||||
|
SHA=${{ github.event.client_payload.sha || 'latest' }}
|
||||||
|
docker push 10.70.69.22:30500/ember/fluffychat:latest
|
||||||
|
docker push 10.70.69.22:30500/ember/fluffychat:${SHA}
|
||||||
18
.forgejo/workflows/fluffychat-trigger.yaml
Normal file
18
.forgejo/workflows/fluffychat-trigger.yaml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
name: Trigger FluffyChat CI Pipeline
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- deployment
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
dispatch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Trigger build in ci-pipelines repo
|
||||||
|
run: |
|
||||||
|
curl -s -X POST \
|
||||||
|
"http://forgejo.tooling.svc.cluster.local:3000/api/v1/repos/ember/ci-pipelines/dispatches" \
|
||||||
|
-H "Authorization: token ${{ secrets.CI_DISPATCH_TOKEN }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"event_type": "fluffychat-push", "client_payload": {"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}}'
|
||||||
68
.forgejo/workflows/watch-repos.yaml
Normal file
68
.forgejo/workflows/watch-repos.yaml
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
name: Watch Repos for Changes
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '*/5 * * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-continuwuity:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: docker:cli
|
||||||
|
steps:
|
||||||
|
- name: Install tools
|
||||||
|
run: apk add --no-cache git curl
|
||||||
|
|
||||||
|
- name: Check for new commits
|
||||||
|
run: |
|
||||||
|
LAST_SHA=$(curl -s "http://forgejo.tooling.svc.cluster.local:3000/api/v1/repos/ember/continuwuity/branches/deployment" | grep -o '"sha":"[^"]*"' | head -1 | cut -d'"' -f4)
|
||||||
|
BUILT_SHA=$(curl -s "http://10.70.69.22:30500/v2/ember/continuwuity/tags/list" | grep -o "$LAST_SHA" || true)
|
||||||
|
if [ -z "$BUILT_SHA" ] && [ -n "$LAST_SHA" ]; then
|
||||||
|
echo "New commit detected: $LAST_SHA"
|
||||||
|
echo "BUILD=true" >> $GITHUB_ENV
|
||||||
|
echo "SHA=$LAST_SHA" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "No new commits"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Trigger build
|
||||||
|
if: env.BUILD == 'true'
|
||||||
|
run: |
|
||||||
|
git clone --depth 1 --branch deployment \
|
||||||
|
http://forgejo.tooling.svc.cluster.local:3000/ember/continuwuity.git .
|
||||||
|
docker build -t 10.70.69.22:30500/ember/continuwuity:latest \
|
||||||
|
-t 10.70.69.22:30500/ember/continuwuity:${SHA} \
|
||||||
|
-f docker/Dockerfile .
|
||||||
|
docker push 10.70.69.22:30500/ember/continuwuity:latest
|
||||||
|
docker push 10.70.69.22:30500/ember/continuwuity:${SHA}
|
||||||
|
|
||||||
|
check-fluffychat:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: docker:cli
|
||||||
|
steps:
|
||||||
|
- name: Install tools
|
||||||
|
run: apk add --no-cache git curl
|
||||||
|
|
||||||
|
- name: Check for new commits
|
||||||
|
run: |
|
||||||
|
LAST_SHA=$(curl -s "http://forgejo.tooling.svc.cluster.local:3000/api/v1/repos/ember/fluffychat/branches/deployment" | grep -o '"sha":"[^"]*"' | head -1 | cut -d'"' -f4)
|
||||||
|
BUILT_SHA=$(curl -s "http://10.70.69.22:30500/v2/ember/fluffychat/tags/list" | grep -o "$LAST_SHA" || true)
|
||||||
|
if [ -z "$BUILT_SHA" ] && [ -n "$LAST_SHA" ]; then
|
||||||
|
echo "New commit detected: $LAST_SHA"
|
||||||
|
echo "BUILD=true" >> $GITHUB_ENV
|
||||||
|
echo "SHA=$LAST_SHA" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "No new commits"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Trigger build
|
||||||
|
if: env.BUILD == 'true'
|
||||||
|
run: |
|
||||||
|
git clone --depth 1 --branch deployment \
|
||||||
|
http://forgejo.tooling.svc.cluster.local:3000/ember/fluffychat.git .
|
||||||
|
docker build -t 10.70.69.22:30500/ember/fluffychat:latest \
|
||||||
|
-t 10.70.69.22:30500/ember/fluffychat:${SHA} .
|
||||||
|
docker push 10.70.69.22:30500/ember/fluffychat:latest
|
||||||
|
docker push 10.70.69.22:30500/ember/fluffychat:${SHA}
|
||||||
Loading…
Add table
Reference in a new issue