Skip to content

Commit

Permalink
build: update dependencies (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexashley authored Mar 14, 2024
1 parent 1d9fa40 commit 0545494
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build-and-push:
uses: liatrio/gh-trusted-builds-workflows/.github/workflows/[email protected].4
uses: liatrio/gh-trusted-builds-workflows/.github/workflows/[email protected].11
permissions:
actions: read
id-token: write
Expand All @@ -16,7 +16,7 @@ jobs:
pull-requests: read
security-scan:
needs: [ build-and-push ]
uses: liatrio/gh-trusted-builds-workflows/.github/workflows/[email protected].4
uses: liatrio/gh-trusted-builds-workflows/.github/workflows/[email protected].11
permissions:
id-token: write
contents: read
Expand All @@ -27,7 +27,7 @@ jobs:
needs:
- build-and-push
- security-scan
uses: liatrio/gh-trusted-builds-workflows/.github/workflows/[email protected].4
uses: liatrio/gh-trusted-builds-workflows/.github/workflows/[email protected].11
permissions:
id-token: write
contents: read
Expand All @@ -38,7 +38,7 @@ jobs:
needs:
- build-and-push
- policy-verification
uses: liatrio/gh-trusted-builds-workflows/.github/workflows/[email protected].4
uses: liatrio/gh-trusted-builds-workflows/.github/workflows/[email protected].11
permissions:
id-token: write
packages: read
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/liatrio/gh-trusted-builds-app

go 1.20
go 1.22.1

require github.com/google/uuid v1.3.0
require github.com/google/uuid v1.6.0
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
15 changes: 10 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
package main

import (
"errors"
"fmt"
"log"
"net/http"

"github.com/google/uuid"
)

func main() {
http.HandleFunc("/ping", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("PONG"))
_, _ = w.Write([]byte("PONG"))
})

http.HandleFunc("/id", func(w http.ResponseWriter, r *http.Request) {
id := uuid.New()
w.Write([]byte(fmt.Sprintf(`{"id": "%s"}`, id.String())))
_, _ = w.Write([]byte(fmt.Sprintf(`{"id": "%s"}`, id.String())))
})

http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("OK"))
_, _ = w.Write([]byte("OK"))
})

http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
})

fmt.Println("Starting server on :8080")
http.ListenAndServe(":8080", nil)
log.Println("Starting server on :8080")
err := http.ListenAndServe(":8080", nil)
if err != nil && !errors.Is(err, http.ErrServerClosed) {
log.Fatalln("error starting server:", err)
}
}
4 changes: 3 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
":semanticCommitTypeAll(build)",
":semanticCommitScopeDisabled"
],
"enabledManagers": ["github-actions", "dockerfile", "gomod"]
"postUpdateOptions": [
"gomodTidy"
]
}

0 comments on commit 0545494

Please sign in to comment.