-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 02bc021
Showing
15 changed files
with
1,337 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Automatically sets up your devbox environment whenever you cd into this | ||
# directory via our direnv integration: | ||
|
||
eval "$(devbox generate direnv --print-envrc)" | ||
|
||
# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/ | ||
# for more details |
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,42 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Fetch all tags | ||
run: git fetch --force --tags | ||
- name: Docker Login | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.22.x | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,60 @@ | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
name: run tests | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.22.x | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Run linters | ||
uses: golangci/golangci-lint-action@v3 | ||
|
||
test: | ||
strategy: | ||
matrix: | ||
go-version: [ '1.22.x' ] | ||
os: [ 'ubuntu-latest', 'macos-latest' ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Install Go | ||
if: success() | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Run tests | ||
run: go test -v ./... | ||
|
||
# coverage: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Install Go | ||
# if: success() | ||
# uses: actions/setup-go@v2 | ||
# with: | ||
# go-version: 1.15.x | ||
# - name: Checkout code | ||
# uses: actions/checkout@v2 | ||
# - name: Calc coverage | ||
# run: | | ||
# go test -v -covermode=count -coverprofile=coverage.out ./... | ||
# - name: Convert coverage.out to coverage.lcov | ||
# uses: jandelgado/[email protected] | ||
# - name: Coveralls | ||
# uses: coverallsapp/[email protected] | ||
# with: | ||
# github-token: ${{ secrets.github_token }} | ||
# path-to-lcov: coverage.lcov | ||
# |
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,20 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
# devbox | ||
.devbox | ||
|
||
/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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
main: ./cmd | ||
archives: | ||
- name_template: >- | ||
{{ .ProjectName }}_ | ||
{{ .Version }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
dockers: | ||
- image_templates: | ||
- ghcr.io/networkteam/{{ .ProjectName }}:{{ .Version }}-amd64 | ||
dockerfile: Dockerfile | ||
use: buildx | ||
build_flag_templates: | ||
- --platform=linux/amd64 | ||
- --label=org.opencontainers.image.title={{ .ProjectName }} | ||
- --label=org.opencontainers.image.description={{ .ProjectName }} | ||
- --label=org.opencontainers.image.url=https://github.com/networkteam/{{ .ProjectName }} | ||
- --label=org.opencontainers.image.source=https://github.com/networkteam/{{ .ProjectName }} | ||
- --label=org.opencontainers.image.version={{ .Version }} | ||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} | ||
- --label=org.opencontainers.image.revision={{ .FullCommit }} | ||
- --label=org.opencontainers.image.licenses=MIT | ||
- image_templates: | ||
- ghcr.io/networkteam/{{ .ProjectName }}:{{ .Version }}-arm64v8 | ||
goarch: arm64 | ||
dockerfile: Dockerfile | ||
use: buildx | ||
build_flag_templates: | ||
- --platform=linux/arm64/v8 | ||
- --label=org.opencontainers.image.title={{ .ProjectName }} | ||
- --label=org.opencontainers.image.description={{ .ProjectName }} | ||
- --label=org.opencontainers.image.url=https://github.com/networkteam/{{ .ProjectName }} | ||
- --label=org.opencontainers.image.source=https://github.com/networkteam/{{ .ProjectName }} | ||
- --label=org.opencontainers.image.version={{ .Version }} | ||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} | ||
- --label=org.opencontainers.image.revision={{ .FullCommit }} | ||
- --label=org.opencontainers.image.licenses=MIT | ||
docker_manifests: | ||
- name_template: ghcr.io/networkteam/{{ .ProjectName }}:{{ .Version }} | ||
image_templates: | ||
- ghcr.io/networkteam/{{ .ProjectName }}:{{ .Version }}-amd64 | ||
- ghcr.io/networkteam/{{ .ProjectName }}:{{ .Version }}-arm64v8 | ||
- name_template: ghcr.io/networkteam/{{ .ProjectName }}:latest | ||
image_templates: | ||
- ghcr.io/networkteam/{{ .ProjectName }}:{{ .Version }}-amd64 | ||
- ghcr.io/networkteam/{{ .ProjectName }}:{{ .Version }}-arm64v8 | ||
checksum: | ||
name_template: "checksums.txt" | ||
snapshot: | ||
name_template: "{{ incpatch .Tag }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" |
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,4 @@ | ||
FROM alpine:3.19 | ||
ENTRYPOINT ["/stacker"] | ||
STOPSIGNAL SIGINT | ||
COPY stacker /stacker |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 networkteam | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,13 @@ | ||
# Stacker | ||
|
||
A tool to rebase container (Docker) images instead of rebuilding them. | ||
|
||
It is based around the idea of OCI annotations for base images to just change the layers of the base image if a newer version is available. | ||
|
||
## Acknowledgements | ||
|
||
This tool heavily uses https://github.com/google/go-containerregistry/tree/main/cmd/crane for the image manipulation. | ||
|
||
## License | ||
|
||
[MIT](./LICENSE) |
Oops, something went wrong.