Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Bump docker/login-action from 2 to 3 #18

Bump docker/login-action from 2 to 3

Bump docker/login-action from 2 to 3 #18

Workflow file for this run

name: build
on: # yamllint disable-line rule:truthy
pull_request:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch all tags
run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: Build & install
run: |
go mod tidy
go build -v ./...
go install
- name: Tests
run: |
sudo apt-get install -y bats
go test -v ./...
go vet ./...
bats ./bats
- name: Login to DockerHub
uses: docker/login-action@v3
if: success() && startsWith(github.ref, 'refs/tags/')
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
if: success() && startsWith(github.ref, 'refs/tags/')
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}