Compare commits
2 commits
main
...
deployment
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e469f937c | |||
| bfe7415f9d |
5 changed files with 0 additions and 119 deletions
|
|
@ -1,33 +0,0 @@
|
|||
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}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
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 }}"}}'
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
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