From fa909031ed148484c5072d949c5ed73d915ce1ed Mon Sep 17 00:00:00 2001 From: marun Date: Mon, 15 Jul 2024 08:36:16 -0700 Subject: [PATCH] [ci] Add actionlint job (#1235) --- .github/workflows/codeql-analysis.yml | 3 +-- .github/workflows/release.yml | 6 +++--- .github/workflows/tests.yml | 5 ++++- scripts/actionlint.sh | 7 +++++++ 4 files changed, 15 insertions(+), 6 deletions(-) create mode 100755 scripts/actionlint.sh diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 35cd46622d..639963adec 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -68,4 +68,3 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e7592da21f..21fff68b02 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: sudo apt-get -y update sudo apt-get -y install gcc-aarch64-linux-gnu - name: Checkout osxcross - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: tpoechtrager/osxcross path: osxcross @@ -41,9 +41,9 @@ jobs: wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz -O tarballs/MacOSX11.3.sdk.tar.xz echo cd4f08a75577145b8f05245a2975f7c81401d75e9535dcffbb879ee1deefcbf4 tarballs/MacOSX11.3.sdk.tar.xz | sha256sum -c - UNATTENDED=1 ./build.sh - echo $PWD/target/bin >> $GITHUB_PATH + echo "$PWD/target/bin" >> "$GITHUB_PATH" - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v3 with: distribution: goreleaser version: latest diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c030d97b93..523ca3a890 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,6 +34,9 @@ jobs: - name: Run shellcheck shell: bash run: scripts/shellcheck.sh + - name: Run actionlint + shell: bash + run: scripts/actionlint.sh unit_test: name: Golang Unit Tests (${{ matrix.os }}) @@ -51,7 +54,7 @@ jobs: - name: Set timeout on Windows # Windows UT run slower and need a longer timeout shell: bash if: matrix.os == 'windows-latest' - run: echo "TIMEOUT=1200s" >> $GITHUB_ENV + run: echo "TIMEOUT=1200s" >> "$GITHUB_ENV" - run: go mod download shell: bash - run: ./scripts/build.sh ./build/subnetevm diff --git a/scripts/actionlint.sh b/scripts/actionlint.sh new file mode 100755 index 0000000000..bdc3083e6b --- /dev/null +++ b/scripts/actionlint.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -euo pipefail + +go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.1 + +actionlint