skeleton ready
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Compute image tag
|
||||
id: tag
|
||||
run: |
|
||||
BRANCH="${{ gitea.ref_name }}"
|
||||
|
||||
if [ "$BRANCH" = "main" ]; then
|
||||
TAG="latest"
|
||||
elif [[ "$BRANCH" == v* ]]; then
|
||||
TAG="$BRANCH"
|
||||
else
|
||||
TAG="test"
|
||||
fi
|
||||
|
||||
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: blinkfink182/donetick-notifier:${{ steps.tag.outputs.tag }}
|
||||
|
||||
- name: Notify Apprise (success)
|
||||
if: success()
|
||||
run: |
|
||||
curl -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{
|
||||
\"tags\": \"all\",
|
||||
\"title\": \"Gitea Build Succeeded\",
|
||||
\"body\": \"Repo: ${{ gitea.repository }}\\nBranch: ${{ gitea.ref_name }}\\nImage tag built successfully\"
|
||||
}" \
|
||||
REMOVED_URL
|
||||
|
||||
- name: Notify Apprise (failure)
|
||||
if: failure()
|
||||
run: |
|
||||
curl -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{
|
||||
\"tags\": \"all\",
|
||||
\"title\": \"Gitea Build Failed\",
|
||||
\"body\": \"Repo: ${{ gitea.repository }}\\nBranch: ${{ gitea.ref_name }}\\nCheck logs in Gitea\"
|
||||
}" \
|
||||
REMOVED_URL
|
||||
@@ -0,0 +1,4 @@
|
||||
.postmate/postmate-envs.json
|
||||
.vscode/launch.json
|
||||
.env.ps1
|
||||
debug.ps1
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"id": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5",
|
||||
"collectionName": "Donetick API",
|
||||
"creatredOn": "2026-05-06T22:35:56.440Z",
|
||||
"folders": [],
|
||||
"requests": [
|
||||
{
|
||||
"id": "2ca9a16c-8b4d-4620-8466-15daa317f7ad",
|
||||
"collectionId": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5",
|
||||
"containerId": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5",
|
||||
"collectionName": "Donetick API",
|
||||
"name": "Get Chores",
|
||||
"url": "https://todo.ktr32.org/eapi/v1/chore",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"accept": "*/*",
|
||||
"user-agent": "https://postmateclient.com",
|
||||
"secretkey": "REMOVED_API_KEY"
|
||||
},
|
||||
"body": {
|
||||
"json": {}
|
||||
},
|
||||
"tests": [],
|
||||
"bodyFromat": "json",
|
||||
"testScript": "",
|
||||
"bodyFormat": "json",
|
||||
"preRequestScript": "",
|
||||
"preRequests": [],
|
||||
"auth": {
|
||||
"type": "apikey",
|
||||
"key": "secretkey",
|
||||
"value": "{{secretkey}}",
|
||||
"addTo": "header"
|
||||
},
|
||||
"cookies": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
[
|
||||
{
|
||||
"url": "https://todo.ktr32.org/eapi/v1/chore",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"accept": "*/*",
|
||||
"user-agent": "https://postmateclient.com",
|
||||
"secretkey": "REMOVED_API_KEY"
|
||||
},
|
||||
"tests": [],
|
||||
"preRequestScript": "",
|
||||
"testScript": "",
|
||||
"id": "2ca9a16c-8b4d-4620-8466-15daa317f7ad",
|
||||
"name": "Get Chores",
|
||||
"collectionId": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5",
|
||||
"containerId": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5",
|
||||
"collectionName": "Donetick API",
|
||||
"bodyFormat": "json",
|
||||
"preRequests": [],
|
||||
"auth": {
|
||||
"type": "apikey",
|
||||
"key": "secretkey",
|
||||
"value": "{{secretkey}}",
|
||||
"addTo": "header"
|
||||
},
|
||||
"cookies": [],
|
||||
"timestamp": 1778107167278
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,7 @@
|
||||
[
|
||||
{
|
||||
"key": "content-type",
|
||||
"value": "application/json",
|
||||
"default": false
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,6 @@
|
||||
FROM mcr.microsoft.com/powershell
|
||||
|
||||
WORKDIR /data
|
||||
ADD ["Start-DoneTickNotifier.ps1", "/data/"]
|
||||
|
||||
ENTRYPOINT ["pwsh", "-Command", "/data/Start-DoneTickNotifier.ps1"]
|
||||
@@ -0,0 +1,6 @@
|
||||
[string] $dtHost = $ENV:DONETICKHOST
|
||||
[string] $dtPort = $ENV:DONETICKPORT
|
||||
[string] $dtAPIKey = $ENV:DONETICKAPIKEY
|
||||
[string] $appriseWebhookURL = $ENV:APPRISEWEBHOOKURL
|
||||
[string] $appriseWebhookTag = $ENV:APPRISEWEBHOOKTAG
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# SAMPLE DOCKER COMPOSE
|
||||
services:
|
||||
donetick-notifier:
|
||||
container_name: donetick-notifier
|
||||
image: docker.io/blinkfink182/donetick-notifier
|
||||
environment:
|
||||
# BELOW ARE ALL REQUIRED
|
||||
- DONETICKHOST=host.docker.internal # donetick host
|
||||
- DONETICKPORT=8787 # donetick port
|
||||
- DONETICKAPIKEY=adminpass # donetick API key
|
||||
- APPRISEWEBHOOKURL=https://apprisehost/notify/config # apprise notification url
|
||||
- APPRISEWEBHOOKTAG=all # apprise notification tag
|
||||
@@ -0,0 +1,152 @@
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"frequencyType": {
|
||||
"type": "string"
|
||||
},
|
||||
"frequency": {
|
||||
"type": "integer"
|
||||
},
|
||||
"frequencyMetadata": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"unit": {
|
||||
"type": "string"
|
||||
},
|
||||
"time": {
|
||||
"type": "string"
|
||||
},
|
||||
"timezone": {
|
||||
"type": "string"
|
||||
},
|
||||
"weekPattern": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"unit",
|
||||
"time",
|
||||
"timezone",
|
||||
"weekPattern"
|
||||
]
|
||||
},
|
||||
"nextDueDate": {
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
"isRolling": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"assignedTo": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"assignees": {
|
||||
"type": "array"
|
||||
},
|
||||
"assignStrategy": {
|
||||
"type": "string"
|
||||
},
|
||||
"isActive": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"notification": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"notificationMetadata": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"templates": {
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"templates"
|
||||
]
|
||||
},
|
||||
"labels": {
|
||||
"type": "null"
|
||||
},
|
||||
"labelsV2": {
|
||||
"type": "array"
|
||||
},
|
||||
"circleId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdBy": {
|
||||
"type": "integer"
|
||||
},
|
||||
"updatedBy": {
|
||||
"type": "integer"
|
||||
},
|
||||
"thingChore": {
|
||||
"type": "null"
|
||||
},
|
||||
"status": {
|
||||
"type": "integer"
|
||||
},
|
||||
"priority": {
|
||||
"type": "integer"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"requireApproval": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isPrivate": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"completionWindow": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"name",
|
||||
"frequencyType",
|
||||
"frequency",
|
||||
"frequencyMetadata",
|
||||
"nextDueDate",
|
||||
"isRolling",
|
||||
"assignedTo",
|
||||
"assignees",
|
||||
"assignStrategy",
|
||||
"isActive",
|
||||
"notification",
|
||||
"notificationMetadata",
|
||||
"labels",
|
||||
"labelsV2",
|
||||
"circleId",
|
||||
"createdAt",
|
||||
"updatedAt",
|
||||
"createdBy",
|
||||
"updatedBy",
|
||||
"thingChore",
|
||||
"status",
|
||||
"priority",
|
||||
"description",
|
||||
"requireApproval",
|
||||
"isPrivate",
|
||||
"completionWindow"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user