Skip to content

Commit

Permalink
Merge pull request #226 from chalin/chalin-im-ci-fixes-2023-11-19
Browse files Browse the repository at this point in the history
[CI] Upgrade GH actions to avoid CI deprecation warnings
  • Loading branch information
wjdp committed Nov 27, 2023
2 parents bd3c2ff + 0db1450 commit 855c4f2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ name: build
on: [push, pull_request]

env:
GO_VERSION: 1.17.8
GO_VERSION: 1.21.4

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: pre-commit/action@v2.0.3

git-describe:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
Expand All @@ -32,9 +32,9 @@ jobs:
os: [ ubuntu-latest, macos-latest ]
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Run unit tests
Expand All @@ -49,21 +49,21 @@ jobs:
os: [ ubuntu-latest, macos-latest ]
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --force --tags
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Set binary name
run: echo "BINARY_NAME=htmltest-${{ matrix.os }}-$(echo $GITHUB_REF | cut -d'/' -f 3)-$(echo $GITHUB_SHA | cut -c1-8)" >> $GITHUB_ENV
- name: Build
run: go build -ldflags "-X main.date=`date -u +%Y-%m-%dT%H:%M:%SZ` -X main.version=`git describe --tags`" -o bin/$BINARY_NAME -x main.go
- name: Upload binary
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ env.BINARY_NAME }}
path: bin/${{ env.BINARY_NAME }}
Expand All @@ -81,9 +81,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: gofmt
Expand All @@ -95,13 +95,13 @@ jobs:
needs: [ test, build ]
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --force --tags
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Run GoReleaser
Expand All @@ -120,7 +120,7 @@ jobs:
DOCKER_REPO: wjdp/htmltest
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GO_VERSION=1.17.8
ARG GO_VERSION=1.21.4
ARG TARGET=alpine:3.9

FROM golang:${GO_VERSION}-alpine AS builder
Expand Down

0 comments on commit 855c4f2

Please sign in to comment.