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