forked from jpillora/chisel
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(RDGRS-752): Chisel update (#25)
Version update of upstream
- Loading branch information
Showing
18 changed files
with
197 additions
and
65 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,16 @@ | ||
# build stage | ||
FROM golang:alpine AS build | ||
RUN apk update && apk add git | ||
ADD . /src | ||
WORKDIR /src | ||
ENV CGO_ENABLED=0 | ||
RUN go build \ | ||
-ldflags "-X github.com/jpillora/chisel/share.BuildVersion=$(git describe --abbrev=0 --tags)" \ | ||
-o /tmp/bin | ||
# run stage | ||
FROM scratch | ||
LABEL maintainer="[email protected]" | ||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
WORKDIR /app | ||
COPY --from=build /tmp/bin /app/bin | ||
ENTRYPOINT ["/app/bin"] |
File renamed without changes.
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,53 @@ | ||
# test this file with | ||
# goreleaser release --config goreleaser.yml --clean --snapshot | ||
version: 2 | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
ldflags: | ||
- -s -w -X github.com/jpillora/chisel/share.BuildVersion={{.Version}} | ||
flags: | ||
- -trimpath | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
- openbsd | ||
goarch: | ||
- 386 | ||
- amd64 | ||
- arm | ||
- arm64 | ||
- ppc64 | ||
- ppc64le | ||
- mips | ||
- mipsle | ||
- mips64 | ||
- mips64le | ||
- s390x | ||
goarm: | ||
- 5 | ||
- 6 | ||
- 7 | ||
gomips: | ||
- hardfloat | ||
- softfloat | ||
nfpms: | ||
- maintainer: "https://github.com/{{ .Env.GITHUB_USER }}" | ||
formats: | ||
- deb | ||
- rpm | ||
- apk | ||
archives: | ||
- format: gz | ||
files: | ||
- none* | ||
release: | ||
draft: true | ||
prerelease: auto | ||
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 |
---|---|---|
@@ -1,26 +1,90 @@ | ||
on: [push, pull_request] | ||
name: CI | ||
on: | ||
pull_request: {} | ||
push: {} | ||
permissions: write-all | ||
jobs: | ||
# ================ | ||
# TEST JOB | ||
# runs on every push and PR | ||
# runs 2x3 times (see matrix) | ||
# BUILD AND TEST JOB | ||
# ================ | ||
test: | ||
name: Test | ||
name: Build & Test | ||
strategy: | ||
matrix: | ||
go-version: [1.21.x] | ||
platform: [ubuntu-latest] | ||
# optionally test/build across multiple platforms/Go-versions | ||
go-version: ["stable"] # '1.16', '1.17', '1.18, | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Install Go | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
check-latest: true | ||
- name: Build | ||
run: go build -v -o /dev/null . | ||
- name: Test | ||
run: go test -v ./... | ||
run: go test -v ./... | ||
# ================ | ||
# RELEASE BINARIES (on push "v*" tag) | ||
# ================ | ||
release_binaries: | ||
name: Release Binaries | ||
needs: test | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: goreleaser | ||
if: success() | ||
uses: docker://goreleaser/goreleaser:latest | ||
env: | ||
GITHUB_USER: ${{ github.repository_owner }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
args: release --config .github/goreleaser.yml | ||
# ================ | ||
# RELEASE DOCKER IMAGES (on push "v*" tag) | ||
# ================ | ||
release_docker: | ||
name: Release Docker Images | ||
needs: test | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: jpillora | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: jpillora/chisel | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: .github/Dockerfile | ||
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/386,linux/arm/v7,linux/arm/v6 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
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,6 +1,6 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Jaime Pillora <[email protected]> | ||
Copyright (c) 2024 Jaime Pillora <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
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
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
Oops, something went wrong.