chore: upgrade actions

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
This commit is contained in:
Yue Yang 2024-03-25 10:02:41 +08:00
parent c31ee824d7
commit 1378c0f838
3 changed files with 12 additions and 16 deletions

View File

@ -19,25 +19,21 @@ jobs:
runs-on: ${{ fromJson('{"amd64":"ubuntu-latest", "arm64":["self-hosted", "Linux", "ARM64"]}')[matrix.arch] }}
steps:
- name: Set up Go 1.18
uses: actions/setup-go@v1
with:
go-version: 1.18.2
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
- name: Set up Go 1.18
uses: actions/setup-go@v4
with:
go-version: 1.20.x
id: go
- name: ${{ matrix.job }}
run: |
# workaround for https://github.com/actions/setup-go/issues/14
export GOPATH=${GITHUB_WORKSPACE}/go
export PATH=$PATH:$GOPATH/bin
#use sh function
# use sh function
if [[ "$job" == "verify" ]]; then
# preload go modules before goimports
go mod download -x

View File

@ -16,7 +16,7 @@ jobs:
container: ${{ fromJson('{"amd64":"docker.io/centos:7.2.1511", "arm64":"docker.io/centos:centos7"}')[matrix.arch] }}
steps:
- name: Set up Go 1.18
uses: actions/setup-go@v1
uses: actions/setup-go@v4
with:
go-version: 1.18.2
id: go
@ -29,7 +29,7 @@ jobs:
echo /opt/rh/rh-git227/root/usr/bin >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=/opt/rh/httpd24/root/usr/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- uses: actions/checkout@master
- uses: actions/checkout@v4
with:
fetch-depth: 0

View File

@ -15,7 +15,7 @@ jobs:
container: ${{ fromJson('{"amd64":"docker.io/centos:7.2.1511", "arm64":"docker.io/centos:centos7"}')[matrix.arch] }}
steps:
- name: Set up Go 1.18
uses: actions/setup-go@v1
uses: actions/setup-go@v4
with:
go-version: 1.18.2
id: go
@ -28,7 +28,7 @@ jobs:
echo /opt/rh/rh-git227/root/usr/bin >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=/opt/rh/httpd24/root/usr/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- uses: actions/checkout@master
- uses: actions/checkout@v4
with:
fetch-depth: 0