Use setup-go v3 with built-in cache
This commit is contained in:
7
.github/workflows/lint.yaml
vendored
7
.github/workflows/lint.yaml
vendored
@@ -17,14 +17,15 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup go ${{ matrix.go }}
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
cache: true
|
||||
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.45.2
|
||||
version: v1.46.2
|
||||
skip-build-cache: true
|
||||
skip-pkg-cache: true
|
||||
args: --build-tags "containers_image_openpgp containers_image_ostree" --timeout 5m --skip-dirs internal/pkg/staticfiles
|
||||
|
||||
22
.github/workflows/releasebuild.yml
vendored
22
.github/workflows/releasebuild.yml
vendored
@@ -16,29 +16,30 @@ jobs:
|
||||
id: version_number
|
||||
run: |
|
||||
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set the git source location
|
||||
id: source_loc
|
||||
run: |
|
||||
echo "SRC=${GITHUB_REF}" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.16'
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
cache: true
|
||||
|
||||
- name: Build tar.gz
|
||||
run: make dist
|
||||
|
||||
- name: Upload mock script
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: mockbuild.sh
|
||||
path: ci/mockbuild.sh
|
||||
|
||||
- name: Upload tar.gz
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
@@ -57,28 +58,35 @@ jobs:
|
||||
id: version_number
|
||||
run: |
|
||||
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||
|
||||
- name: Download mock build script
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: mockbuild.sh
|
||||
|
||||
- name: Download tar.gz
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: warewulf-${{ env.VERSION }}.tar.gz
|
||||
|
||||
- name: Set execute bit
|
||||
run: chmod +x mockbuild.sh
|
||||
|
||||
- name: Run rpm build script
|
||||
run: ./mockbuild.sh ${{ env.VERSION }}
|
||||
|
||||
- name: Upload EL8 RPM
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: warewulf-${{ env.VERSION }}-${{ env.RELEASE }}.el8.x86_64.rpm
|
||||
path: warewulf-${{ env.VERSION }}-${{ env.RELEASE }}.el8.x86_64.rpm
|
||||
|
||||
- name: Upload EL7 RPM
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: warewulf-${{ env.VERSION }}-${{ env.RELEASE }}.el7.x86_64.rpm
|
||||
path: warewulf-${{ env.VERSION }}-${{ env.RELEASE }}.el7.x86_64.rpm
|
||||
|
||||
- name: Upload Assets To Release
|
||||
uses: xresloader/upload-to-github-release@master
|
||||
env:
|
||||
|
||||
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@@ -25,16 +25,10 @@ jobs:
|
||||
run: sudo apt-get install libgpgme-dev
|
||||
|
||||
- name: Setup go ${{ matrix.go }}
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
cache: true
|
||||
|
||||
- name: Build with go ${{ matrix.go }}
|
||||
run: make all
|
||||
|
||||
Reference in New Issue
Block a user