Skip to content

chore: address pkg vulns #30

chore: address pkg vulns

chore: address pkg vulns #30

Workflow file for this run

name: GitHub Action
on: push
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22
- uses: golangci/golangci-lint-action@v4
with:
version: v1.55
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Test
run: go test `go list ./... | grep -v test`
build-push-image:
runs-on: ubuntu-latest
needs:
- lint
- test
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
labels: ${{ steps.meta.outputs.labels }}
file: build/Dockerfile
tags: |
infrolabs/infro-core:latest
infrolabs/infro-core:${{ github.sha }}