32 Commits

Author SHA1 Message Date
Łukasz Budnik
48cb758883 Merge pull request #62 from lukaszbudnik/upgrade-docker-dependencies-add-integration-test
upgraded docker containers for golang and alpine
2023-01-08 20:39:59 +01:00
Łukasz Budnik
196306d131 correct bash if-then-else syntax 2023-01-08 20:36:31 +01:00
Łukasz Budnik
c5415206e6 upgraded docker containers for golang and alpine, added simple integration test 2023-01-08 20:33:08 +01:00
Łukasz Budnik
66b4078631 Merge pull request #61 from lukaszbudnik/dependabot/github_actions/actions/checkout-3.3.0
Bump actions/checkout from 3.1.0 to 3.3.0
2023-01-08 17:43:12 +01:00
dependabot[bot]
d14e46e839 Bump actions/checkout from 3.1.0 to 3.3.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.1.0...v3.3.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-05 17:01:35 +00:00
Łukasz Budnik
21ffd8ef65 Merge pull request #57 from lukaszbudnik/dependabot/go_modules/github.com/stretchr/testify-1.8.1
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1
2022-10-28 17:47:17 +02:00
dependabot[bot]
75cd57556b Bump github.com/stretchr/testify from 1.8.0 to 1.8.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 17:49:28 +00:00
Łukasz Budnik
27d54a67c5 Merge pull request #46 from lukaszbudnik/dependabot/github_actions/docker/build-push-action-3
Bump docker/build-push-action from 2 to 3
2022-10-07 22:56:46 +02:00
dependabot[bot]
394b6c6b19 Bump docker/build-push-action from 2 to 3
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 3.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-07 20:52:09 +00:00
Łukasz Budnik
572a661570 Merge pull request #45 from lukaszbudnik/dependabot/github_actions/docker/metadata-action-4
Bump docker/metadata-action from 3 to 4
2022-10-07 22:51:34 +02:00
dependabot[bot]
ae2c5d1f80 Bump docker/metadata-action from 3 to 4
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3 to 4.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-07 20:49:08 +00:00
Łukasz Budnik
0b8223504c Merge pull request #48 from lukaszbudnik/dependabot/github_actions/actions/setup-go-3.2.0
Bump actions/setup-go from 2 to 3.2.0
2022-10-07 22:48:34 +02:00
dependabot[bot]
d10a176e53 Bump actions/setup-go from 2 to 3.2.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.2.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-07 20:44:58 +00:00
Łukasz Budnik
e8636e09ac Merge pull request #53 from lukaszbudnik/dependabot/go_modules/github.com/stretchr/testify-1.8.0
Bump github.com/stretchr/testify from 1.7.0 to 1.8.0
2022-10-07 22:44:00 +02:00
dependabot[bot]
109e665451 Bump github.com/stretchr/testify from 1.7.0 to 1.8.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-07 20:32:54 +00:00
Łukasz Budnik
33c6293042 Merge pull request #55 from lukaszbudnik/dependabot/docker/alpine-3.16.2
Bump alpine from 3.14.2 to 3.16.2
2022-10-07 22:31:53 +02:00
dependabot[bot]
6c93e2987b Bump alpine from 3.14.2 to 3.16.2
Bumps alpine from 3.14.2 to 3.16.2.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-07 20:29:23 +00:00
Łukasz Budnik
cfdeef0e2a Merge pull request #44 from lukaszbudnik/dependabot/github_actions/docker/login-action-2
Bump docker/login-action from 1 to 2
2022-10-07 22:28:26 +02:00
dependabot[bot]
1842453288 Bump docker/login-action from 1 to 2
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-07 20:26:52 +00:00
Łukasz Budnik
9fdfd5cb17 Merge pull request #56 from lukaszbudnik/dependabot/github_actions/actions/checkout-3.1.0
Bump actions/checkout from 2.4.0 to 3.1.0
2022-10-07 22:26:15 +02:00
dependabot[bot]
62d92811ce Bump actions/checkout from 2.4.0 to 3.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-04 17:07:54 +00:00
Łukasz Budnik
5e0380377f Merge pull request #31 from lukaszbudnik/dependabot/docker/golang-1.17.3-alpine3.13
Bump golang from 1.17.2-alpine3.13 to 1.17.3-alpine3.13
2021-11-05 18:28:09 +01:00
dependabot[bot]
669c88abce Bump golang from 1.17.2-alpine3.13 to 1.17.3-alpine3.13
Bumps golang from 1.17.2-alpine3.13 to 1.17.3-alpine3.13.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-05 17:09:55 +00:00
Łukasz Budnik
46ce22d8ec Merge pull request #30 from lukaszbudnik/dependabot/github_actions/actions/checkout-2.4.0
Bump actions/checkout from 2.3.5 to 2.4.0
2021-11-03 18:20:39 +01:00
dependabot[bot]
6e8531123f Bump actions/checkout from 2.3.5 to 2.4.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.5...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-03 17:07:22 +00:00
Łukasz Budnik
f651a27580 Merge pull request #29 from lukaszbudnik/dependabot/github_actions/actions/checkout-2.3.5
Bump actions/checkout from 2.3.4 to 2.3.5
2021-10-16 08:35:46 +02:00
dependabot[bot]
900118758f Bump actions/checkout from 2.3.4 to 2.3.5
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.4...v2.3.5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-15 17:07:06 +00:00
Łukasz Budnik
2da157319c Merge pull request #26 from lukaszbudnik/dependabot/docker/alpine-3.14.2
Bump alpine from 3.14.1 to 3.14.2
2021-10-08 19:51:42 +02:00
dependabot[bot]
1f0946a0b1 Bump alpine from 3.14.1 to 3.14.2
Bumps alpine from 3.14.1 to 3.14.2.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-08 17:50:47 +00:00
Łukasz Budnik
1b5234d37c Merge pull request #28 from lukaszbudnik/dependabot/docker/golang-1.17.2-alpine3.13
Bump golang from 1.17.0-alpine3.13 to 1.17.2-alpine3.13
2021-10-08 19:50:11 +02:00
dependabot[bot]
b334dcfcea Bump golang from 1.17.0-alpine3.13 to 1.17.2-alpine3.13
Bumps golang from 1.17.0-alpine3.13 to 1.17.2-alpine3.13.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-08 17:06:54 +00:00
Łukasz Budnik
f09931b33a Create FUNDING.yml 2021-09-01 12:56:16 +02:00
7 changed files with 41 additions and 17 deletions

3
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
# These are supported funding model platforms
github: [lukaszbudnik]

View File

@@ -7,6 +7,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3.3.0
- name: Build the Docker image
run: docker build . --file Dockerfile --tag yosoy-local:$(date +%s)
run: docker build . --file Dockerfile --tag yosoy-local:latest
- name: Run simple integration test
run: |
docker run -p 3333:80 yosoy-local:latest > yosoy.log &
sleep 5
RESULT=$(curl -s -X DELETE -H 'x-api-key: abc123' 'http://0.0.0.0:3333/sample/path?with=params')
echo "$RESULT"
if [[ $RESULT =~ '"method":"DELETE"' ]]
then
echo 'Test successful'
exit 0
else
echo 'Test failure'
exit 1
fi

View File

@@ -15,16 +15,16 @@ jobs:
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v3.3.0
- name: Log in to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -32,7 +32,7 @@ jobs:
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: |
lukasz/yosoy
@@ -44,7 +44,7 @@ jobs:
type=semver,pattern={{major}}
- name: Build and push Docker images
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
push: true

View File

@@ -6,12 +6,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3.3.0
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.16
go-version: 1.19
- name: Build
run: go build -v ./...

View File

@@ -1,4 +1,4 @@
FROM golang:1.17.0-alpine3.13 as builder
FROM golang:1.19-alpine as builder
LABEL maintainer="Łukasz Budnik lukasz.budnik@gmail.com"
@@ -6,7 +6,7 @@ LABEL maintainer="Łukasz Budnik lukasz.budnik@gmail.com"
ADD . /go/yosoy
RUN cd /go/yosoy && go build
FROM alpine:3.14.1
FROM alpine:3.17
COPY --from=builder /go/yosoy/yosoy /bin
# register entrypoint

2
go.mod
View File

@@ -5,5 +5,5 @@ go 1.16
require (
github.com/gorilla/handlers v1.5.1
github.com/gorilla/mux v1.8.0
github.com/stretchr/testify v1.7.0
github.com/stretchr/testify v1.8.1
)

15
go.sum
View File

@@ -1,5 +1,6 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ=
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
@@ -9,8 +10,14 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=