Skip to content

Commit

Permalink
ci: bump github actions and simplify golangci job
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct committed Feb 27, 2024
1 parent 93bcf62 commit ebd21d0
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
if: contains(github.head_ref, 'release-please') != true && contains(github.head_ref, 'breaking-release') == true
runs-on: ubuntu-latest
steps:
- uses: 8BitJonny/gh-get-current-pr@2.2.0
- uses: 8BitJonny/gh-get-current-pr@v3
with:
sha: ${{ github.event.pull_request.head.sha }}
id: PR
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/change-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ jobs:
if: contains(github.head_ref, 'release-please')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: "${{ secrets.RELEASER_TOKEN }}"
fetch-depth: 0
- name: Change versions
run: |
run: |
api/scripts/update-package-versions.sh "$(cat version.txt)"
api/scripts/update-own-version-constants.sh "$(cat version.txt)"
enclave-manager/web/scripts/update-package-versions.sh "$(cat version.txt)"
scripts/update-license-version.sh "$(cat version.txt)"
- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v5
with:
token: "${{ secrets.RELEASER_TOKEN }}"
4 changes: 2 additions & 2 deletions .github/workflows/check-proto-break.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
if: ${{ needs.check-if-code-change.outputs.change == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- run: go install github.com/bufbuild/buf/cmd/[email protected]
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if PR is breaking
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golang-package-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Get current version
run: echo "CURRENT_VERSION=$(cat version.txt)" >> $GITHUB_ENV
- name: Tag golang package
uses: pkgdeps/git-tag-action@v2
uses: pkgdeps/git-tag-action@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repo: ${{ github.repository }}
Expand Down
100 changes: 19 additions & 81 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,94 +42,32 @@ jobs:
if: ${{ needs.check-if-code-change.outputs.change == 'true' }}
name: golang-lint
runs-on: ubuntu-latest
strategy:
matrix:
directory:
- container-engine-lib
- contexts-config-store
- grpc-file-transfer/golang
- metrics-library/golang
- name_generator
- api/golang
- core/server
- core/launcher
- engine/server
- engine/launcher
- internal_testsuites/golang
- cli/cli
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Generate versions
- run: scripts/generate-kurtosis-version.sh
- name: lint-container-engine-lib
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLINT_VERSION }}
working-directory: container-engine-lib/
args: --timeout=3m
skip-pkg-cache: true
- name: lint-contexts-config-store
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLINT_VERSION }}
working-directory: contexts-config-store/
args: --timeout=3m
skip-pkg-cache: true
- name: lint-grpc-file-transfer
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLINT_VERSION }}
working-directory: grpc-file-transfer/golang/
args: --timeout=3m
skip-pkg-cache: true
- name: lint-metrics-library
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLINT_VERSION }}
working-directory: metrics-library/golang
args: --timeout=3m
skip-pkg-cache: true
- name: lint-name-generator
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLINT_VERSION }}
working-directory: name_generator/
args: --timeout=3m
skip-pkg-cache: true
- name: lint-api-golang
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLINT_VERSION }}
working-directory: api/golang/
args: --timeout=3m
skip-pkg-cache: true
- name: lint-core-server
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLINT_VERSION }}
working-directory: core/server
args: --timeout=3m
skip-pkg-cache: true
- name: lint-core-launcher
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLINT_VERSION }}
working-directory: core/launcher/
args: --timeout=3m
skip-pkg-cache: true
- name: lint-engine-server
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLINT_VERSION }}
working-directory: engine/server/
args: --timeout=3m
skip-pkg-cache: true
- name: lint-engine-launcher
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLINT_VERSION }}
working-directory: engine/launcher/
args: --timeout=3m
skip-pkg-cache: true
- name: lint-internal-test-suites
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLINT_VERSION }}
working-directory: internal_testsuites/golang/
args: --timeout=3m
skip-pkg-cache: true
- name: lint-cli
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: ${{ env.GOLINT_VERSION }}
working-directory: cli/cli/
working-directory: ${{ matrix.directory }}
args: --timeout=3m
skip-pkg-cache: true
4 changes: 2 additions & 2 deletions .github/workflows/issue-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:
permissions:
issues: write
contents: read

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@v3.1
- uses: github/issue-labeler@v3.4
with:
configuration-path: .github/issue-labeler.yml
enable-versioned-regex: 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
}}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name:
- name: Enforce to use yarn
run: |
# We had a bug where we were using both Yarn and NPM to maintain Docusaurus, which
# meant separate and conflicting lockfiles
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: "Release please"
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
- uses: google-github-actions/release-please-action@v4
with:
# We use the RELEASER_TOKEN so that the GitHub Actions
# can run on the PR created
Expand Down

0 comments on commit ebd21d0

Please sign in to comment.