Skip to content

Commit

Permalink
Change licence to CC BY-NC-ND 4.0, update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
everesio committed Aug 23, 2022
1 parent 4123f76 commit c0ea180
Show file tree
Hide file tree
Showing 802 changed files with 81,872 additions and 46,248 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: https://paypal.me/grepplabs?locale.x=en_GB
35 changes: 3 additions & 32 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,18 @@ name: build

on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.14
go-version: 1.18
- name: Run build
run: make clean build
- name: Run test
run: make test
- name: Build and push Docker image
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: grepplabs/mqtt-proxy
tag_with_ref: true
always_pull: true
add_git_labels: true
- name: Set goreleaser env varbiales
run: |
echo "::set-env name=REVISION::$(git describe --tags --always --dirty)"
echo "::set-env name=BRANCH::$(git rev-parse --abbrev-ref HEAD)"
echo "::set-env name=BUILD_DATE::$(date +'%Y.%m.%d-%H:%M:%S')"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68 changes: 68 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: release

on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master

jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Run build
run: make clean build
- name: Run test
run: make test
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
grepplabs/mqtt-proxy
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Helm package
run: make HELM_BIN=helm helm-package
- name: Set goreleaser env variables
run: |
echo "REVISION=$(git describe --tags --always --dirty)" >> $GITHUB_ENV
echo "BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
echo "BUILD_DATE=$(date +'%Y.%m.%d-%H:%M:%S')" >> $GITHUB_ENV
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/bin
/dist
/target
/.cr-release-packages

/*.tar
/*.tgz
Expand Down
4 changes: 3 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ archives:
- name_template: "{{ .ProjectName }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
wrap_in_directory: false
files:
- LICENSE
- LICENSE.md
checksum:
name_template: 'CHECKSUM'
release:
Expand All @@ -29,3 +29,5 @@ release:
name: mqtt-proxy
draft: false
prerelease: auto
extra_files:
- glob: .cr-release-packages/mqtt-proxy-*-chart.tgz
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.14-alpine3.11 as builder
FROM golang:1.18-alpine3.16 as builder

RUN apk add alpine-sdk ca-certificates

Expand All @@ -8,6 +8,7 @@ ADD . "/code"
# https://github.com/confluentinc/confluent-kafka-go: When building your application for Alpine Linux (musl libc) you must pass -tags musl to go get, go build, etc.
RUN make BINARY=mqtt-proxy BUILD_FLAGS="-tags musl" GOOS=linux GOARCH=amd64 build

FROM alpine:3.11
FROM alpine:3.16
RUN apk add ca-certificates
COPY --from=builder /code/mqtt-proxy /mqtt-proxy
ENTRYPOINT ["/mqtt-proxy"]
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

Loading

0 comments on commit c0ea180

Please sign in to comment.