Merge pull request #188 from complexorganizations/dependabot/go_modul… #579
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Get the system requirements. | |
run: sudo apt-get install coreutils -y | |
- name: Get the current version of Go from project. | |
run: cat go.mod | head -3 | tail -1 | echo "GO_VERSION_FROM_PROJECT=$(cut -d' ' -f2)" >>${GITHUB_ENV} | |
- name: Set up Go version "${{ env.GO_VERSION_FROM_PROJECT }}" | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "${{ env.GO_VERSION_FROM_PROJECT }}" | |
id: go | |
- name: Get dependencies | |
run: go get . | |
- name: Build Test | |
run: go build . |