Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuto committed Dec 9, 2022
2 parents c2590aa + 9841ff2 commit 37cece7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
28 changes: 27 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
tags:
- '*'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:

build:
Expand Down Expand Up @@ -36,4 +40,26 @@ jobs:
file: twamp_exporter-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
asset_name: twamp_exporter-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
tag: ${{ github.ref_name }}
overwrite: true
overwrite: true

- name: Log in to the Container registry
uses: docker/login-action@v2.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN}}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4.1.1
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 2 additions & 2 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestPortRangeValidate(t *testing.T) {
t.Run("good port range", func(t *testing.T) {
for _, test := range goodParamsTests {
if err := test.Validate(); err != nil {
t.Errorf("PortRange.Validate() didn't work perperly when %+v", test)
t.Errorf("PortRange.Validate() didn't work properly when %+v", test)
}
}
})
Expand Down Expand Up @@ -86,7 +86,7 @@ func TestConfigValidate(t *testing.T) {

t.Run(testTitle, func(t *testing.T) {
if err := testConfig.Validate(); err == nil {
t.Errorf("Config.Validate() didn't work perperly when %+v", testConfig)
t.Errorf("Config.Validate() didn't work properly when %+v", testConfig)
}
})
}
Expand Down

0 comments on commit 37cece7

Please sign in to comment.