Skip to content

Commit 5963823

Browse files
authored
Merge pull request #136 from julwrites/staging
Fixing build errors in deploy
2 parents bf82252 + d6452b2 commit 5963823

4 files changed

Lines changed: 13 additions & 15 deletions

File tree

.github/workflows/automation.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: Build Test Automation
22
on:
3-
push:
4-
branches:
5-
- master
6-
- staging
73
pull_request:
84
branches:
95
- master

.github/workflows/deployment.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
name: Build, Stage and Deploy Automation
22
on:
3-
workflow_run:
4-
workflows: ["Build Test Automation"]
5-
types:
6-
- completed
3+
push:
74
branches:
85
- master
96
jobs:
107
build-and-deploy:
118
runs-on: ubuntu-latest
12-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
139

1410
steps:
1511
- name: Install Go

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ RUN go mod download
77
RUN go mod verify
88
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /go/bin/main main.go
99

10-
FROM alpine:latest as certificates
10+
FROM alpine:latest AS certificates
1111

1212
RUN apk --no-cache add ca-certificates
1313

14-
FROM scratch as runner
15-
# FROM ubuntu:latest as runner
14+
FROM scratch AS runner
15+
# FROM ubuntu:latest AS runner
1616

1717
ARG GCLOUD_PROJECT_ID
1818
ENV GCLOUD_PROJECT_ID=$GCLOUD_PROJECT_ID

pkg/bot/sub.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import (
66

77
"github.com/julwrites/BotPlatform/pkg/def"
88
"github.com/julwrites/BotPlatform/pkg/platform"
9-
"github.com/julwrites/BotPlatform/pkg/secrets"
9+
bpsecrets "github.com/julwrites/BotPlatform/pkg/secrets"
1010
"github.com/julwrites/ScriptureBot/pkg/app"
11+
"github.com/julwrites/ScriptureBot/pkg/secrets"
1112
"github.com/julwrites/ScriptureBot/pkg/utils"
1213
)
1314

@@ -53,10 +54,15 @@ func HandleSubscriptionPublish(env def.SessionData) def.SessionData {
5354
return env
5455
}
5556

56-
func SubscriptionHandler(secrets *secrets.SecretsData) {
57+
func SubscriptionHandler(localSecrets *secrets.SecretsData) {
5758
env := def.SessionData{}
5859

59-
env.Secrets = *secrets
60+
platformSecrets := bpsecrets.SecretsData{
61+
TELEGRAM_ID: localSecrets.TELEGRAM_ID,
62+
PROJECT_ID: localSecrets.PROJECT_ID,
63+
}
64+
65+
env.Secrets = platformSecrets
6066
log.Printf("Loaded secrets...")
6167

6268
env.ResourcePath = "/go/bin/"

0 commit comments

Comments
 (0)