Skip to content

Merge pull request #134 from jadolg/dependabot/go_modules/github.com/… #290

Merge pull request #134 from jadolg/dependabot/go_modules/github.com/…

Merge pull request #134 from jadolg/dependabot/go_modules/github.com/… #290

Workflow file for this run

name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
test:
name: build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: /bin/bash build_executables.sh
- name: Test
run: go test -v ./...
docker:
name: build and push Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/dockerimagesave:${{ github.sha }}
- name: Build and latest
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/dockerimagesave:latest