Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,42 @@ jobs:
- id: URL
run: echo "::set-output name=URL::$(jq -r '.JProfByBotStack.URL' cdk.out/outputs.json)"
working-directory: .deploy/lambda

herald:
name: Herald
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 17

- uses: gradle/wrapper-validation-action@v1

- uses: gradle/gradle-build-action@v2
with:
arguments: :herald:install
cache-read-only: ${{ github.ref != 'refs/heads/master' }}

- uses: docker/metadata-action@v3
id: metadata
with:
images: |
ghcr.io/${{ github.repository_owner }}/herald
flavor: |
latest=true

- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/build-push-action@v2
with:
context: herald
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
7 changes: 7 additions & 0 deletions herald/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ARG JAVA=17

FROM openjdk:${JAVA}

COPY build/install/* /opt/herald

ENTRYPOINT ["/opt/herald/bin/herald"]
3 changes: 3 additions & 0 deletions herald/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
= Herald

This feature posts scheduled messages to the chat.
8 changes: 8 additions & 0 deletions herald/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
plugins {
kotlin("jvm")
application
}

application {
mainClass.set("by.jprof.telegram.bot.herald.AppKt")
}
5 changes: 5 additions & 0 deletions herald/src/main/kotlin/by/jprof/telegram/bot/herald/App.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package by.jprof.telegram.bot.herald

suspend fun main(args: Array<String>) {
println("Hello, world!")
}
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ include(":pins:dynamodb")
include(":pins:sfn")
include(":runners:lambda")
include(":currencies")
include(":herald")