Skip to content

Merge pull request #229 from smutel/Fix228 #134

Merge pull request #229 from smutel/Fix228

Merge pull request #229 from smutel/Fix228 #134

Workflow file for this run

---
name: Master
on:
push:
branches:
- master
jobs:
LintAndBuild:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ['1.21.x']
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Lint
uses: reviewdog/[email protected]
with:
github_token: ${{ secrets.github_token }}
golangci_lint_flags: "--config=.golangci.yml"
- name: Setup env
run: |
echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV
echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH
mkdir -p "$(dirname $GITHUB_WORKSPACE)/src/github.com/smutel"
ln -sf "$GITHUB_WORKSPACE/" "$(dirname $GITHUB_WORKSPACE)/src/github.com/smutel/terraform-provider-netbox"
shell: bash
- name: Go installation
uses: actions/[email protected]
with:
go-version: ${{ matrix.go }}
- name: Go fmt
run: |
cd "$(dirname $GITHUB_WORKSPACE)/src/github.com/smutel/terraform-provider-netbox"
find . -name "*.go" -exec gofmt -s -w {} \;
shell: bash
- name: Go generate
run: |
cd "$(dirname $GITHUB_WORKSPACE)/src/github.com/smutel/terraform-provider-netbox"
go generate
shell: bash
- name: Commit changes
uses: EndBug/[email protected]
with:
add: 'netbox docs'
author_name: smutel
default_author: github_actor
message: 'ci: Go fmt & go generate'
- name: Build
run: |
cd "$(dirname $GITHUB_WORKSPACE)/src/github.com/smutel/terraform-provider-netbox"
make build
shell: bash