-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pin dependencies, update permissions in workflows, and add license sc…
…anning Signed-off-by: John Kjell <[email protected]>
- Loading branch information
Showing
8 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,11 +36,11 @@ jobs: | |
|
||
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
with: | ||
go-version: '1.19.x' | ||
go-version: '1.21.x' | ||
|
||
- name: Check DB Migrations | ||
run: | | ||
curl -sSf https://atlasgo.sh | sh | ||
go get ariga.io/atlas/cmd/[email protected] | ||
before=$(find ent/migrate/migrations/ -type f | wc -l | awk '{ print $1 }') | ||
make db-migrations | ||
after=$(find ent/migrate/migrations/ -type f | wc -l | awk '{ print $1 }') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: "Fossa Scan" | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: ["main"] | ||
schedule: | ||
- cron: "0 0 * * 1" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
fossa-scan: | ||
env: | ||
FOSSA_API_KEY: ${{ secrets.fossaApiKey }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- if: ${{ env.FOSSA_API_KEY != '' }} | ||
name: "Checkout Code" | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- if: ${{ env.FOSSA_API_KEY != '' }} | ||
name: "Run FOSSA Scan" | ||
uses: fossas/fossa-action@f61a4c0c263690f2ddb54b9822a719c25a7b608f # v1.3.1 | ||
with: | ||
api-key: ${{ env.FOSSA_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,13 +15,13 @@ | |
FROM golang:1.21.5-alpine@sha256:4db4aac30880b978cae5445dd4a706215249ad4f43d28bd7cdf7906e9be8dd6b AS build | ||
WORKDIR /src | ||
RUN apk update && apk add --no-cache file git curl | ||
RUN curl -sSf https://atlasgo.sh | sh | ||
RUN go get ariga.io/atlas/cmd/[email protected] | ||
ENV GOMODCACHE /root/.cache/gocache | ||
RUN --mount=target=. --mount=target=/root/.cache,type=cache \ | ||
CGO_ENABLED=0 go build -o /out/archivista -ldflags '-s -d -w' ./cmd/archivista; \ | ||
file /out/archivista | grep "statically linked" | ||
|
||
FROM alpine | ||
FROM alpine:3.19.0@sha256:13b7e62e8df80264dbb747995705a986aa530415763a6c58f84a3ca8af9a5bcd | ||
COPY --from=build /out/archivista /bin/archivista | ||
COPY --from=build /usr/local/bin/atlas /bin/atlas | ||
ADD entrypoint.sh /bin/entrypoint.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
FROM golang:1.21.5-alpine@sha256:4db4aac30880b978cae5445dd4a706215249ad4f43d28bd7cdf7906e9be8dd6b AS build | ||
WORKDIR /src | ||
RUN apk update && apk add --no-cache file git curl | ||
RUN curl -sSf https://atlasgo.sh | sh | ||
RUN go get ariga.io/atlas/cmd/[email protected] | ||
ENV GOMODCACHE /root/.cache/gocache | ||
RUN go install github.com/githubnemo/CompileDaemon@latest | ||
RUN go install github.com/githubnemo/CompileDaemon@v1.4.0 | ||
ENTRYPOINT ["sh", "entrypoint-dev.sh"] |