chore: update docker namespace and password (#58) #5
Workflow file for this run
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
# Reference from: | |
# https://goreleaser.com/ci/actions/ | |
name: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
permissions: | |
contents: write | |
jobs: | |
Test: | |
name: Unit tests with coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go 1.18 | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.18 | |
- run: go version | |
- run: go env | |
- run: go test ./... | |
- run: go build | |
- name: Running go tests with coverage | |
env: | |
GO111MODULE: on | |
run: make cover | |
- name: Send coverage | |
uses: shogo82148/actions-goveralls@v1 | |
with: | |
path-to-profile: coverage.out | |
Publish: # Pack and publish image to Docker Hub and Github Release | |
runs-on: ubuntu-latest | |
needs: [Test] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.18 | |
# <--- Login, build and push image to Docker Hub ---> | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
# <--- End ---> | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.KCL_LANG_BOT_TOKEN }} | |
RELEASE_VERSION: ${{ github.ref }} |