Skip to content

build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 #464

build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0

build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 #464

Workflow file for this run

name: Go
on:
push:
branches:
release:
types: [published]
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: "1.20"
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Check formatting
run: |
make format format-doc
git diff --exit-code
- name: Build
run: |
go version
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o prepare-import
cp ./prepare-import ./build-container
- name: Test
run: go test ./... -v -coverprofile=coverage.out
- name: Upload test coverage to codacy
if: github.actor != 'dependabot[bot]'
run: >
bash <(curl -Ls https://coverage.codacy.com/get.sh) report
--coverage-reports coverage.out
--force-coverage-parser go
--project-token ${{ secrets.CODACY_REPOSITORY_TOKEN_FOR_COVERAGE }}
- name: Login to GitHub Container Registry
id: login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=semver,pattern={{version}}
type=sha
flavor: |
latest=false
- name: Build and push Docker image
if: github.actor != 'dependabot[bot]'
uses: docker/build-push-action@v5
with:
context: ./build-container
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}