Update Dependencies (#80) #207
This file contains hidden or 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
| name: golang | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ github.token }} | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: stable | |
| - name: format | |
| run: go fmt ./... | |
| - name: vet | |
| run: go vet ./... | |
| - name: lint | |
| uses: golangci/golangci-lint-action@v7 | |
| - name: test | |
| run: go test -v ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./... -json > report.json | |
| - name: report | |
| uses: becheran/go-testreport@main | |
| with: | |
| input: report.json | |
| - name: coverage | |
| run: | | |
| echo "## coverage report" >> $GITHUB_STEP_SUMMARY | |
| echo '' >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| go tool cover -func=cover.out >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| - uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| distribution: goreleaser | |
| args: release --snapshot --clean --skip archive | |
| - name: push images | |
| if: ${{ github.ref_type == 'branch' }} | |
| run: | | |
| docker push ghcr.io/${{ github.repository }}:${{ github.ref_name }}-arm64 | |
| docker push ghcr.io/${{ github.repository }}:${{ github.ref_name }}-amd64 | |
| docker manifest create \ | |
| ghcr.io/${{ github.repository }}:${{ github.ref_name }} \ | |
| ghcr.io/${{ github.repository }}:${{ github.ref_name }}-arm64 \ | |
| ghcr.io/${{ github.repository }}:${{ github.ref_name }}-amd64 | |
| docker manifest push ghcr.io/${{ github.repository }}:${{ github.ref_name }} |