From 1bfa1e6c6eaef7c2c75a62b4d0f9d352493a6c7f Mon Sep 17 00:00:00 2001 From: Ties de Kock Date: Fri, 3 Mar 2023 14:56:16 +0100 Subject: [PATCH] Build with stable and specified go version --- .github/workflows/codeql.yml | 8 ++++---- .github/workflows/docker-tag.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/go.yml | 18 +++++++++--------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a521b75..1b11ce4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -12,13 +12,13 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Go 1.x - uses: actions/setup-go@v2 + - name: Set latest stable go version + uses: actions/setup-go@v3 with: - go-version: ^1.19 + go-version: 'stable' - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: '0' diff --git a/.github/workflows/docker-tag.yml b/.github/workflows/docker-tag.yml index 4ae26e6..e51d485 100644 --- a/.github/workflows/docker-tag.yml +++ b/.github/workflows/docker-tag.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check Out Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Get short SHA from commit hash id: tagcalc diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5aef7fe..def0cca 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -12,7 +12,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" - name: Check Out Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Login to Docker Hub uses: docker/login-action@v1 diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 175c882..fe59bd7 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,19 +12,19 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Go 1.x - uses: actions/setup-go@v2 - with: - go-version: ^1.19 - - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: '0' + - name: Set up go version from go.mod + uses: actions/setup-go@v3 + with: + go-version-file: 'go.mod' + - name: Test & Vet run: make test vet - + - name: Build run: | GOOS=linux make build-stayrtr @@ -36,13 +36,13 @@ jobs: GOOS=linux make build-rtrmon GOOS=darwin make build-rtrmon GOOS=windows EXTENSION=.exe make build-rtrmon - + - name: Install fpm run: | sudo apt-get update sudo apt-get install -y rpm ruby ruby-dev sudo gem install fpm - + - name: Package run: make package-deb-stayrtr package-rpm-stayrtr