diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b454d37..355cc95 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -24,8 +24,11 @@ jobs: - name: Download go.mod dependencies run: go mod download - - name: Build - run: go build -v ./... - - - name: Test + - name: Test waffle WAF run: go test -v ./... + + - name: Install go-task to build docker image + run: sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin + + - name: Build Waffle docker image + run: task dockerBuild \ No newline at end of file diff --git a/Taskfile.yaml b/Taskfile.yaml index a53b617..545108f 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -1,5 +1,8 @@ version: '3' +env: + IMAGE_NAME: '{{ .IMAGE_NAME | default "qniw984/waffle:1.0.0" }}' + tasks: certs_windows: cmds: @@ -27,10 +30,10 @@ tasks: cmds: - mockery - docker-build: + dockerBuild: cmds: - - docker build -t ${IMAGE_NAME} -f .\build\Dockerfile . + - docker build -t {{ .IMAGE_NAME }] -f .\build\Dockerfile . - docker-push: + dockerPush: cmds: - - docker push ${IMAGE_NAME} + - docker push {{ .IMAGE_NAME }]