Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b528334
commit 5317a90
Showing
21 changed files
with
228 additions
and
156 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 |
---|---|---|
@@ -1 +1 @@ | ||
export GO111MODULE=on | ||
dotenv |
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,16 @@ | ||
name: Actionlint | ||
|
||
on: | ||
push: | ||
paths: | ||
- .github/workflows/* | ||
pull_request: | ||
paths: | ||
- .github/workflows/* | ||
|
||
jobs: | ||
actionlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: reviewdog/action-actionlint@v1 |
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 |
---|---|---|
@@ -1,21 +1,37 @@ | ||
ARG go_version=1.19 | ||
ARG kustomize_version=v4.5.7 | ||
|
||
FROM golang:${go_version} as tools | ||
# development | ||
FROM golang:${go_version} AS development | ||
|
||
ENV GO111MODULE=on | ||
ENV CGO_ENABLED=0 | ||
RUN go install sigs.k8s.io/kustomize/kustomize/v4@v4.5.5 | ||
RUN go install sigs.k8s.io/kustomize/kustomize/v4@${kustomize_version} | ||
|
||
FROM golang:${go_version} as builder | ||
COPY . /mischan-bot | ||
|
||
COPY . /work | ||
ENV GO111MODULE=on | ||
ENV CGO_ENABLED=0 | ||
RUN cd /work && go build -o /mischan-bot | ||
WORKDIR /mischan-bot | ||
|
||
FROM gcr.io/distroless/static:debug | ||
CMD go mod download \ | ||
&& GO111MODULE=on go run main.go | ||
|
||
COPY --from=tools /go/bin/kustomize /bin | ||
COPY --from=builder /mischan-bot /bin | ||
# workspace | ||
FROM golang:${go_version} AS workspace | ||
|
||
ENTRYPOINT [ "/bin/mischan-bot" ] | ||
RUN go install sigs.k8s.io/kustomize/kustomize/v4@${kustomize_version} | ||
|
||
COPY . /mischan-bot | ||
|
||
WORKDIR /mischan-bot | ||
|
||
RUN go mod download \ | ||
&& GO111MODULE=on go build -buildmode pie -o /mischan-bot/mischan-bot | ||
|
||
# production | ||
FROM gcr.io/distroless/base:debug AS production | ||
|
||
RUN ["/busybox/sh", "-c", "ln -s /busybox/sh /bin/sh"] | ||
RUN ["/busybox/sh", "-c", "ln -s /bin/env /usr/bin/env"] | ||
|
||
COPY --from=workspace /mischan-bot/mischan-bot /bin/mischan-bot | ||
COPY --from=workspace /go/bin/kustomize /bin/kustomize | ||
|
||
ENTRYPOINT ["/bin/mischan-bot"] |
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
## mischan-bot | ||
GitOpsで利用するためのGitHub App | ||
|
||
実際にMISWのクラスタにて利用されています | ||
GitOps で利用するための GitHub App | ||
|
||
過去に MISW の k8s クラスタにて利用されていました。 | ||
|
||
## License | ||
- Copyright (c) 2020 MISW | ||
|
||
- Copyright (c) 2020-2023, MIS.W(早稲田大学経営情報学会) All rights reserved. | ||
- Under the MIT License |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.