Skip to content

Commit 461ad0e

Browse files
authored
Merge pull request #32 from /issues/31
Add a stub for the herald Docker image
2 parents a38dfb2 + 91be640 commit 461ad0e

File tree

6 files changed

+63
-0
lines changed

6 files changed

+63
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,42 @@ jobs:
4444
- id: URL
4545
run: echo "::set-output name=URL::$(jq -r '.JProfByBotStack.URL' cdk.out/outputs.json)"
4646
working-directory: .deploy/lambda
47+
48+
herald:
49+
name: Herald
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v2
53+
54+
- uses: actions/setup-java@v2
55+
with:
56+
distribution: adopt
57+
java-version: 17
58+
59+
- uses: gradle/wrapper-validation-action@v1
60+
61+
- uses: gradle/gradle-build-action@v2
62+
with:
63+
arguments: :herald:install
64+
cache-read-only: ${{ github.ref != 'refs/heads/master' }}
65+
66+
- uses: docker/metadata-action@v3
67+
id: metadata
68+
with:
69+
images: |
70+
ghcr.io/${{ github.repository_owner }}/herald
71+
flavor: |
72+
latest=true
73+
74+
- uses: docker/login-action@v1
75+
with:
76+
registry: ghcr.io
77+
username: ${{ github.repository_owner }}
78+
password: ${{ secrets.GITHUB_TOKEN }}
79+
80+
- uses: docker/build-push-action@v2
81+
with:
82+
context: herald
83+
push: true
84+
tags: ${{ steps.metadata.outputs.tags }}
85+
labels: ${{ steps.metadata.outputs.labels }}

herald/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ARG JAVA=17
2+
3+
FROM openjdk:${JAVA}
4+
5+
COPY build/install/* /opt/herald
6+
7+
ENTRYPOINT ["/opt/herald/bin/herald"]

herald/README.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
= Herald
2+
3+
This feature posts scheduled messages to the chat.

herald/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
plugins {
2+
kotlin("jvm")
3+
application
4+
}
5+
6+
application {
7+
mainClass.set("by.jprof.telegram.bot.herald.AppKt")
8+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package by.jprof.telegram.bot.herald
2+
3+
suspend fun main(args: Array<String>) {
4+
println("Hello, world!")
5+
}

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ include(":pins:dynamodb")
3030
include(":pins:sfn")
3131
include(":runners:lambda")
3232
include(":currencies")
33+
include(":herald")

0 commit comments

Comments
 (0)