-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
21 changed files
with
1,309 additions
and
1,886 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,4 +1,5 @@ | ||
.gitignore | ||
.idea/ | ||
.vscode/ | ||
data/ | ||
/.idea/ | ||
/.vscode/ | ||
/data/ | ||
/tmp/ |
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,27 +1,45 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: [ master ] | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15.1 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/checkout@v2 | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: sepa/thanos-kit | ||
tags: | | ||
type=raw,value={{date 'YYMMDD'}} | ||
type=raw,value={{branch}}-{{sha}} | ||
flavor: | | ||
latest=true | ||
- uses: actions/cache@v2 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
username: sepa | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- run: make docker-push | ||
env: | ||
DOCKER_USERNAME: sepa | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
VER=${{ env.DOCKER_METADATA_OUTPUT_VERSION }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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,4 +1,5 @@ | ||
.idea/ | ||
.vscode/ | ||
thanos-kit | ||
data/ | ||
/.idea/ | ||
/.vscode/ | ||
/thanos-kit | ||
/data/ | ||
/tmp/ |
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,13 +1,13 @@ | ||
FROM golang:alpine as builder | ||
FROM golang:1.20 as builder | ||
WORKDIR /build | ||
RUN apk add --no-cache make git | ||
# try to cache deps | ||
COPY go.mod go.sum ./ | ||
RUN go mod download -x | ||
# resets caches | ||
COPY . . | ||
ARG VER | ||
RUN make test && make build | ||
|
||
FROM quay.io/prometheus/busybox:latest | ||
COPY --from=builder /build/thanos-kit /bin/thanos-kit | ||
ENTRYPOINT [ "/bin/thanos-kit" ] | ||
ENTRYPOINT ["/bin/thanos-kit"] |
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
Oops, something went wrong.