-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #451 from erhancagirici/ci-chores
Update GH action dependencies and linter config
- Loading branch information
Showing
14 changed files
with
92 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,9 +14,9 @@ on: | |
|
||
env: | ||
# Common versions | ||
GO_VERSION: "1.21" | ||
GOLANGCI_VERSION: "v1.55.2" | ||
DOCKER_BUILDX_VERSION: "v0.8.2" | ||
GO_VERSION: "1.22" | ||
GOLANGCI_VERSION: "v1.61.0" | ||
DOCKER_BUILDX_VERSION: "v0.18.0" | ||
|
||
# Common users. We can't run a step 'if secrets.AWS_USR != ""' but we can run | ||
# a step 'if env.AWS_USR' != ""', so we copy these to succinctly test whether | ||
|
@@ -26,32 +26,37 @@ env: | |
|
||
jobs: | ||
detect-noop: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
outputs: | ||
noop: ${{ steps.noop.outputs.should_skip }} | ||
steps: | ||
- name: Detect No-op Changes | ||
id: noop | ||
uses: fkirc/[email protected].0 | ||
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
paths_ignore: '["**.md", "**.png", "**.jpg"]' | ||
do_not_skip: '["workflow_dispatch", "schedule", "push"]' | ||
concurrent_skipping: false | ||
|
||
lint: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
needs: detect-noop | ||
if: needs.detect-noop.outputs.noop != 'true' | ||
|
||
steps: | ||
- name: Cleanup Disk | ||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | ||
with: | ||
large-packages: false | ||
swap-storage: false | ||
|
||
- name: Checkout | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3 | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
|
@@ -64,14 +69,14 @@ jobs: | |
run: echo "cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache the Go Build Cache | ||
uses: actions/cache@v3 | ||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | ||
with: | ||
path: ${{ steps.go.outputs.cache }} | ||
key: ${{ runner.os }}-build-lint-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-build-lint- | ||
|
||
- name: Cache Go Dependencies | ||
uses: actions/cache@v3 | ||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | ||
with: | ||
path: .work/pkg | ||
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} | ||
|
@@ -89,18 +94,23 @@ jobs: | |
version: ${{ env.GOLANGCI_VERSION }} | ||
|
||
check-diff: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
needs: detect-noop | ||
if: needs.detect-noop.outputs.noop != 'true' | ||
|
||
steps: | ||
- name: Cleanup Disk | ||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | ||
with: | ||
large-packages: false | ||
swap-storage: false | ||
|
||
- name: Checkout | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3 | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
|
@@ -111,14 +121,14 @@ jobs: | |
echo "go-mod=$(make go.mod.cachedir)" >> $GITHUB_OUTPUT | ||
- name: Cache the Go Build Cache | ||
uses: actions/cache@v3 | ||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | ||
with: | ||
path: ${{ steps.go-cache-paths.outputs.go-build }} | ||
key: ${{ runner.os }}-build-check-diff-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-build-check-diff- | ||
|
||
- name: Cache Go Dependencies | ||
uses: actions/cache@v3 | ||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | ||
with: | ||
path: ${{ steps.go-cache-paths.outputs.go-mod }} | ||
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} | ||
|
@@ -131,21 +141,26 @@ jobs: | |
run: make check-diff | ||
|
||
unit-tests: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
needs: detect-noop | ||
if: needs.detect-noop.outputs.noop != 'true' | ||
|
||
steps: | ||
- name: Cleanup Disk | ||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | ||
with: | ||
large-packages: false | ||
swap-storage: false | ||
|
||
- name: Checkout | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
submodules: true | ||
|
||
- name: Fetch History | ||
run: git fetch --prune --unshallow | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3 | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
|
@@ -156,14 +171,14 @@ jobs: | |
echo "go-mod=$(make go.mod.cachedir)" >> $GITHUB_OUTPUT | ||
- name: Cache the Go Build Cache | ||
uses: actions/cache@v3 | ||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | ||
with: | ||
path: ${{ steps.go-cache-paths.outputs.go-build }} | ||
key: ${{ runner.os }}-build-unit-tests-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-build-unit-tests- | ||
|
||
- name: Cache Go Dependencies | ||
uses: actions/cache@v3 | ||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | ||
with: | ||
path: ${{ steps.go-cache-paths.outputs.go-mod }} | ||
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,34 +13,34 @@ on: | |
|
||
jobs: | ||
detect-noop: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
outputs: | ||
noop: ${{ steps.noop.outputs.should_skip }} | ||
steps: | ||
- name: Detect No-op Changes | ||
id: noop | ||
uses: fkirc/[email protected].0 | ||
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
paths_ignore: '["**.md", "**.png", "**.jpg"]' | ||
do_not_skip: '["workflow_dispatch", "schedule", "push"]' | ||
concurrent_skipping: false | ||
|
||
analyze: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
needs: detect-noop | ||
if: needs.detect-noop.outputs.noop != 'true' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
submodules: true | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
uses: github/codeql-action/init@396bb3e45325a47dd9ef434068033c6d5bb0d11a # v3.27.3 | ||
with: | ||
languages: go | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 | ||
uses: github/codeql-action/analyze@396bb3e45325a47dd9ef434068033c6d5bb0d11a # v3.27.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
|
||
[submodule "build"] | ||
path = build | ||
url = https://github.com/upbound/build | ||
url = https://github.com/crossplane/build |
Oops, something went wrong.