-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 852c75c
Showing
21 changed files
with
1,414 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clips/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
kind: pipeline | ||
type: docker | ||
name: default | ||
|
||
steps: | ||
- name: "Build" | ||
image: plugins/docker | ||
settings: | ||
repo: git.brilliantmonkey.net/frigate/clips | ||
registry: git.brilliantmonkey.net | ||
username: docker | ||
password: | ||
from_secret: GITEA_DOCKER_TOKEN | ||
custom_dns: | ||
- 10.5.10.8 | ||
tags: | ||
- ${DRONE_BUILD_NUMBER}-${DRONE_COMMIT:0:4} | ||
when: | ||
event: | ||
- push | ||
- name: "[TAG] Publish to Gitea" | ||
image: plugins/docker | ||
settings: | ||
repo: git.brilliantmonkey.net/frigate/clips | ||
registry: git.brilliantmonkey.net | ||
username: docker | ||
password: | ||
from_secret: GITEA_DOCKER_TOKEN | ||
custom_dns: | ||
- 10.5.10.8 | ||
tags: | ||
- ${DRONE_TAG} | ||
- latest | ||
when: | ||
event: | ||
- tag | ||
- name: "[TAG] Publish to Github" | ||
image: plugins/docker | ||
settings: | ||
repo: ghcr.io/brilliant-monkey/frigate:clips | ||
username: docker | ||
password: | ||
from_secret: GITHUB_CONTAINER_REGISTRY_TOKEN | ||
tags: | ||
- ${DRONE_TAG} | ||
- latest | ||
environment: | ||
BUILD_ENV: production | ||
registry: git.brilliantmonkey.net | ||
custom_dns: | ||
- 10.5.10.8 | ||
when: | ||
event: | ||
- tag | ||
- name: "[Master] Deploy" | ||
image: quay.io/honestbee/drone-kubernetes | ||
settings: | ||
namespace: default | ||
deployment: frigate-clips | ||
container: app | ||
repo: git.brilliantmonkey.net/frigate/clips | ||
tag: ${DRONE_BUILD_NUMBER}-${DRONE_COMMIT:0:4} | ||
kubernetes_server: | ||
from_secret: KUBE_SERVER | ||
kubernetes_token: | ||
from_secret: DRONE_TOKEN | ||
kubernetes_cert: | ||
from_secret: KUBE_CA | ||
when: | ||
event: | ||
- push | ||
branch: | ||
- master | ||
- name: "[Tag] Deploy" | ||
image: quay.io/honestbee/drone-kubernetes | ||
settings: | ||
namespace: default | ||
deployment: frigate-clips | ||
container: app | ||
repo: git.brilliantmonkey.net/frigate/clips | ||
tag: ${DRONE_TAG} | ||
kubernetes_server: | ||
from_secret: KUBE_SERVER_PROD | ||
kubernetes_token: | ||
from_secret: DRONE_TOKEN_PROD | ||
kubernetes_cert: | ||
from_secret: KUBE_CA_PROD | ||
when: | ||
event: | ||
- tag | ||
- name: '[Push] Slack' | ||
image: plugins/slack | ||
settings: | ||
webhook: | ||
from_secret: SLACK_WEBHOOK_URL | ||
channel: ci | ||
link_names: true | ||
template: > | ||
{{#success build.status}} | ||
*Build Completed Successfully* | ||
`{{repo.name}}` — <{{build.link}}|Build #{{build.number}} on {{build.branch}}> | ||
{{else}} | ||
*Build Failed* | ||
`{{repo.name}}` — <{{build.link}}|Build #{{build.number}} on {{build.branch}}> | ||
{{/success}} | ||
when: | ||
event: | ||
- push | ||
branch: | ||
- master | ||
status: | ||
- success | ||
- failure | ||
|
||
- name: '[TAG] Slack' | ||
image: plugins/slack | ||
settings: | ||
webhook: | ||
from_secret: SLACK_WEBHOOK_URL | ||
channel: ci | ||
link_names: true | ||
template: > | ||
{{#success build.status}} | ||
*Deployment to Production Completed Successfully* | ||
`{{repo.name}}` version {{tag}} — <{{build.link}}|Build #{{build.number}}> | ||
{{else}} | ||
*Deployment to Production Failed* | ||
`{{repo.name}}` version {{tag}}— <{{build.link}}|Build #{{build.number}}> | ||
{{/success}} | ||
when: | ||
event: | ||
- tag | ||
status: | ||
- success | ||
- failure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/github-script@v6 | ||
id: tag | ||
with: | ||
result-encoding: string | ||
script: return context.sha.substring(0,7) | ||
- name: login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: create image from repository | ||
run: docker buildx build --platform linux/amd64 --cache-to type=gha --cache-from type=gha -t ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.result }} . | ||
- name: push image to GitHub Container Registry | ||
run: docker push ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.result }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: pull-request | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
env: | ||
SHA: ${{ github.sha }} | ||
REPO: ${{ github.repository }} | ||
PR: ${{ github.event.pull_request.number }} | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
image_name: ${{ steps.tag.outputs.image_name }} | ||
steps: | ||
- name: Get Docker image name | ||
id: tag | ||
run: | | ||
export TAG=$(echo $SHA | cut -c 1-6) | ||
export IMAGE_NAME=$(echo ghcr.io/$REPO:$TAG-$PR) | ||
echo $IMAGE_NAME | ||
echo "image_name=$IMAGE_NAME" >> $GITHUB_OUTPUT | ||
build: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: create image from repository | ||
run: docker buildx build --platform linux/amd64 --cache-to type=gha --cache-from type=gha -t ${{ needs.setup.outputs.image_name }} . | ||
- name: push image to GitHub Container Registry | ||
run: docker push ${{ needs.setup.outputs.image_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v6 | ||
id: tag | ||
with: | ||
result-encoding: string | ||
script: return context.sha.substring(0,7) | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Pull Latest | ||
run: docker pull ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.result }} | ||
- name: Tag Latest | ||
run: docker tag ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.result }} ghcr.io/${{ github.repository }}:latest | ||
- name: Tag Version | ||
run: docker tag ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.result }} ghcr.io/${{ github.repository }}:${{ github.ref_name }} | ||
- name: push image to GitHub Container Registry | ||
run: docker push --all-tags ghcr.io/${{ github.repository }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
**/*.mp4 | ||
.DS_store | ||
|
||
**/*secret* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
FROM golang:1.18 AS build | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN go mod download | ||
|
||
RUN go build -o runtime cmd/main.go | ||
|
||
FROM linuxserver/ffmpeg | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=build /app/runtime . | ||
|
||
ENTRYPOINT [ "./runtime" ] |
Oops, something went wrong.