Skip to content

Commit

Permalink
Update to use newest go-xmpp lib
Browse files Browse the repository at this point in the history
  • Loading branch information
tmolitor-stud-tu committed Jul 31, 2024
1 parent 63f9120 commit 678b10e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Container image that runs your code
FROM golang:1.13
FROM golang:latest

# Copies your code file from your action repository to the filesystem path `/` of the container
COPY go.mod /notifier/go.mod
COPY entrypoint.sh /notifier/entrypoint.sh
COPY main.go /notifier/main.go

# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/notifier/entrypoint.sh"]
ENTRYPOINT ["/notifier/entrypoint.sh"]
6 changes: 4 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash
go get -u github.com/FluuxIO/go-xmpp
go run /notifier/main.go "${INPUT_SERVER_HOST}" "${INPUT_RECIPIENT}" "${INPUT_JID}" "${INPUT_PASSWORD}" "${INPUT_SERVER_PORT}" "${INPUT_MESSAGE}" "${INPUT_RECIPIENT_IS_ROOM}" "${INPUT_BOT_ALIAS}"
cd "$(dirname "$0")"
go get -d gosrc.io/xmpp
go install gosrc.io/xmpp
go run /notifier/main.go "${INPUT_SERVER_HOST}" "${INPUT_RECIPIENT}" "${INPUT_JID}" "${INPUT_PASSWORD}" "${INPUT_SERVER_PORT}" "${INPUT_MESSAGE}" "${INPUT_RECIPIENT_IS_ROOM}" "${INPUT_BOT_ALIAS}"
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
module go-xmpp_notifier

go 1.13

require gosrc.io/xmpp v0.4.0
require gosrc.io/xmpp latest
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func main() {
Insecure: false,
}
router := xmpp.NewRouter()
client, err := xmpp.NewClient(config, router, errorHandler)
client, err := xmpp.NewClient(&config, router, errorHandler)

if err != nil {
log.Fatalf("%+v", err)
Expand Down

0 comments on commit 678b10e

Please sign in to comment.