Skip to content

Update dependency golangci-lint to v1.64.4 #237

Update dependency golangci-lint to v1.64.4

Update dependency golangci-lint to v1.64.4 #237

Workflow file for this run

on:
push:
name: Build, lint and push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install asdf & tools
uses: asdf-vm/actions/install@v3
with:
asdf_branch: v0.15.0
- name: golangci-lint
run: golangci-lint run
push:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPOSITORY#*/}
SHORTREF=${GITHUB_SHA::8}
# If this is git tag, use the tag name as a docker tag
VERSION=$(echo $GITHUB_REF | cut -d / -f 3)
if [[ $VERSION == "master" ]]; then
VERSION=latest
fi
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${SHORTREF}"
# If the VERSION looks like a version number, assume that
# this is the most recent version of the image and also
# tag it 'latest'.
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
fi
PUSH_TYPE=$(echo $GITHUB_REF | cut -d / -f 2)
# Set output parameters.
echo ::set-output name=tags::${TAGS}
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=push_type::${PUSH_TYPE}
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.prep.outputs.tags }}
- name: Report build to bugsnag
uses: sazap10/bugsnag-builds-action@master
if: steps.prep.outputs.push_type == 'tags'
env:
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}