updated action versions (#885)

* updated action versions

* docker to use go 1.18
This commit is contained in:
David Zhao
2022-08-06 13:40:40 -07:00
committed by GitHub
parent 0918670318
commit 4222f51758
4 changed files with 17 additions and 40 deletions
+6 -13
View File
@@ -11,24 +11,17 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/cache@v2 - uses: shogo82148/actions-setup-redis@v1
with:
path: |
~/go/pkg/mod
~/go/bin
~/.cache
key: livekit-server
- uses: shogo82148/actions-setup-redis@v1.10.3
with: with:
redis-version: '6.x' redis-version: '6.x'
auto-start: true auto-start: true
- run: redis-cli ping - run: redis-cli ping
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v3
with: with:
go-version: 1.17 go-version: '>=1.17'
- name: Set up gotestfmt - name: Set up gotestfmt
run: go install github.com/haveyoudebuggedit/gotestfmt/v2/cmd/gotestfmt@latest run: go install github.com/haveyoudebuggedit/gotestfmt/v2/cmd/gotestfmt@latest
@@ -44,13 +37,13 @@ jobs:
go mod tidy go mod tidy
- name: Mage Build - name: Mage Build
uses: magefile/mage-action@v1 uses: magefile/mage-action@v2
with: with:
version: latest version: latest
args: build args: build
- name: Static Check - name: Static Check
uses: dominikh/staticcheck-action@v1.2.0 uses: dominikh/staticcheck-action@v1
with: with:
version: "2022.1" version: "2022.1"
+7 -16
View File
@@ -11,19 +11,10 @@ jobs:
docker: docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/go/bin
~/.cache
key: ${{ runner.os }}-livekit-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-livekit-
- name: Docker meta - name: Docker meta
id: meta id: meta
uses: docker/metadata-action@v3 uses: docker/metadata-action@v4
with: with:
# list of Docker images to use as base name for tags # list of Docker images to use as base name for tags
images: | images: |
@@ -34,21 +25,21 @@ jobs:
type=semver,pattern=v{{major}}.{{minor}} type=semver,pattern=v{{major}}.{{minor}}
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v3
with: with:
go-version: 1.18 go-version: '>=1.18'
- name: Download Go modules - name: Download Go modules
run: go mod download run: go mod download
- name: Generate code - name: Generate code
uses: magefile/mage-action@v1 uses: magefile/mage-action@v2
with: with:
version: latest version: latest
args: generate args: generate
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v2
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v1 uses: docker/login-action@v1
@@ -58,7 +49,7 @@ jobs:
- name: Build and push - name: Build and push
id: docker_build id: docker_build
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
with: with:
context: . context: .
push: true push: true
+3 -10
View File
@@ -14,21 +14,14 @@ jobs:
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Fetch all tags - name: Fetch all tags
run: git fetch --force --tags run: git fetch --force --tags
- uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/go/bin
~/.cache
key: livekit-server
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v3
with: with:
go-version: 1.18 go-version: '>=1.18'
- name: Run GoReleaser - name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2 uses: goreleaser/goreleaser-action@v2
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.17-alpine as builder FROM golang:1.18-alpine as builder
ARG TARGETPLATFORM ARG TARGETPLATFORM
ARG TARGETARCH ARG TARGETARCH