Skip to content

Commit c0ea180

Browse files
committed
Change licence to CC BY-NC-ND 4.0, update dependencies
1 parent 4123f76 commit c0ea180

File tree

802 files changed

+81872
-46248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

802 files changed

+81872
-46248
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: https://paypal.me/grepplabs?locale.x=en_GB

.github/workflows/build.yaml

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,18 @@ name: build
22

33
on:
44
push:
5-
branches:
6-
- master
7-
tags:
8-
- '*'
9-
pull_request:
10-
branches:
11-
- master
125

136
jobs:
147
build:
158
runs-on: ubuntu-latest
169
steps:
1710
- name: Checkout
18-
uses: actions/checkout@v2
11+
uses: actions/checkout@v3
1912
- name: Setup go
20-
uses: actions/setup-go@v2
13+
uses: actions/setup-go@v3
2114
with:
22-
go-version: 1.14
15+
go-version: 1.18
2316
- name: Run build
2417
run: make clean build
2518
- name: Run test
2619
run: make test
27-
- name: Build and push Docker image
28-
uses: docker/[email protected]
29-
with:
30-
username: ${{ secrets.DOCKER_USERNAME }}
31-
password: ${{ secrets.DOCKER_PASSWORD }}
32-
repository: grepplabs/mqtt-proxy
33-
tag_with_ref: true
34-
always_pull: true
35-
add_git_labels: true
36-
- name: Set goreleaser env varbiales
37-
run: |
38-
echo "::set-env name=REVISION::$(git describe --tags --always --dirty)"
39-
echo "::set-env name=BRANCH::$(git rev-parse --abbrev-ref HEAD)"
40-
echo "::set-env name=BUILD_DATE::$(date +'%Y.%m.%d-%H:%M:%S')"
41-
- name: Run GoReleaser
42-
uses: goreleaser/goreleaser-action@v2
43-
if: startsWith(github.ref, 'refs/tags/')
44-
with:
45-
version: latest
46-
args: release --rm-dist
47-
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- '*'
9+
pull_request:
10+
branches:
11+
- master
12+
13+
jobs:
14+
build-and-release:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
- name: Setup go
20+
uses: actions/setup-go@v3
21+
with:
22+
go-version: 1.18
23+
- name: Run build
24+
run: make clean build
25+
- name: Run test
26+
run: make test
27+
- name: Docker meta
28+
id: meta
29+
uses: docker/metadata-action@v4
30+
with:
31+
images: |
32+
grepplabs/mqtt-proxy
33+
tags: |
34+
type=ref,event=branch
35+
type=ref,event=pr
36+
type=semver,pattern={{version}}
37+
type=semver,pattern={{major}}.{{minor}}
38+
type=semver,pattern={{major}}
39+
type=sha
40+
- name: Set up Docker Buildx
41+
uses: docker/setup-buildx-action@v2
42+
- name: Login to DockerHub
43+
uses: docker/login-action@v2
44+
with:
45+
username: ${{ secrets.DOCKERHUB_USERNAME }}
46+
password: ${{ secrets.DOCKERHUB_TOKEN }}
47+
- name: Build and push
48+
uses: docker/build-push-action@v3
49+
with:
50+
context: .
51+
push: ${{ github.event_name != 'pull_request' }}
52+
tags: ${{ steps.meta.outputs.tags }}
53+
labels: ${{ steps.meta.outputs.labels }}
54+
- name: Helm package
55+
run: make HELM_BIN=helm helm-package
56+
- name: Set goreleaser env variables
57+
run: |
58+
echo "REVISION=$(git describe --tags --always --dirty)" >> $GITHUB_ENV
59+
echo "BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
60+
echo "BUILD_DATE=$(date +'%Y.%m.%d-%H:%M:%S')" >> $GITHUB_ENV
61+
- name: Run GoReleaser
62+
uses: goreleaser/goreleaser-action@v3
63+
if: startsWith(github.ref, 'refs/tags/')
64+
with:
65+
version: latest
66+
args: release --rm-dist
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/bin
44
/dist
55
/target
6+
/.cr-release-packages
67

78
/*.tar
89
/*.tgz

.goreleaser.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ archives:
2020
- name_template: "{{ .ProjectName }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
2121
wrap_in_directory: false
2222
files:
23-
- LICENSE
23+
- LICENSE.md
2424
checksum:
2525
name_template: 'CHECKSUM'
2626
release:
@@ -29,3 +29,5 @@ release:
2929
name: mqtt-proxy
3030
draft: false
3131
prerelease: auto
32+
extra_files:
33+
- glob: .cr-release-packages/mqtt-proxy-*-chart.tgz

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.14-alpine3.11 as builder
1+
FROM golang:1.18-alpine3.16 as builder
22

33
RUN apk add alpine-sdk ca-certificates
44

@@ -8,6 +8,7 @@ ADD . "/code"
88
# 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.
99
RUN make BINARY=mqtt-proxy BUILD_FLAGS="-tags musl" GOOS=linux GOARCH=amd64 build
1010

11-
FROM alpine:3.11
11+
FROM alpine:3.16
12+
RUN apk add ca-certificates
1213
COPY --from=builder /code/mqtt-proxy /mqtt-proxy
1314
ENTRYPOINT ["/mqtt-proxy"]

LICENSE

Lines changed: 0 additions & 201 deletions
This file was deleted.

0 commit comments

Comments
 (0)