-
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
Showing
31 changed files
with
5,957 additions
and
5,560 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 |
---|---|---|
@@ -1,28 +1,22 @@ | ||
name: Publish Docker image | ||
name: Test code | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
env: | ||
IMAGE_NAME: lewislbr/gss | ||
|
||
jobs: | ||
build-push: | ||
name: Build and push the Docker image to Docker Hub | ||
test: | ||
name: Run unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
- name: Get git tag | ||
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV | ||
- name: Build image | ||
run: docker build -t "$IMAGE_NAME":"$GIT_TAG" -t "$IMAGE_NAME":latest . | ||
- name: Log in | ||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | ||
- name: Push image | ||
run: docker push "$IMAGE_NAME":"$GIT_TAG" && docker push "$IMAGE_NAME":latest | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- name: Test | ||
run: go test -v ./... |
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,28 @@ | ||
name: Publish Docker image | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
workflow_dispatch: | ||
|
||
env: | ||
IMAGE_NAME: lewislbr/gss | ||
|
||
jobs: | ||
build-release: | ||
name: Build and push the Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
- name: Get git tag | ||
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV | ||
- name: Build image | ||
run: docker build -t "$IMAGE_NAME":"$GIT_TAG" -t "$IMAGE_NAME":latest . | ||
- name: Log in | ||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | ||
- name: Push image | ||
run: docker push "$IMAGE_NAME":"$GIT_TAG" && docker push "$IMAGE_NAME":latest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
module gss | ||
|
||
go 1.16 | ||
go 1.17 | ||
|
||
require ( | ||
github.com/rs/zerolog v1.25.0 | ||
github.com/stretchr/testify v1.7.0 | ||
gopkg.in/yaml.v2 v2.4.0 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.0 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect | ||
) |
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.