Skip to content

Fix binds

Fix binds #20

Workflow file for this run

name: Go Build, Test, and Docker Build/Push
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21.1'
cache: false
args: --timeout=10m -v
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=10m -v
version: v1.54
test:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.1'
cache: false
- name: Checkout code
uses: actions/checkout@v3
- name: Run golang test
run: go test -gcflags='-l -h' -v ./...
build-docker-image:
needs: ["lint", "test"]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image
uses: docker/build-push-action@v4
with:
tags: |
ghcr.io/${{ github.repository }}/dev/deployment-script:${{ github.sha }}
ghcr.io/${{ github.repository }}/dev/deployment-script:latest
push: false
context: .