deps: update GitHub action dependencies #226
Workflow file for this run
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
name: lint | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
golangci-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Setup Go environment | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
go-version: "stable" | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@38e1018663fa5173f3968ea0777460d3de38f256 # v5.3.0 | |
with: | |
args: --timeout=30m | |
go-tidy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Setup Go environment | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
go-version: "stable" | |
- uses: katexochen/go-tidy-check@427c8c07d3d83ab8d7290cad04ce71c12eab3674 # v2.0.1 | |
govulncheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Setup Go environment | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
go-version: "stable" | |
- name: Run govulncheck | |
shell: bash | |
run: | | |
go install golang.org/x/vuln/cmd/govulncheck@latest | |
govulncheck ./... | |
shellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Run ShellCheck | |
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0 | |
with: | |
severity: info | |
actionlint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Setup Go environment | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
go-version: "stable" | |
- name: Install ShellCheck | |
env: | |
SHELLCHECK_VER: v0.9.0 | |
run: | | |
baseurl=https://github.com/koalaman/shellcheck/releases/download | |
curl -fsSLO "${baseurl}/${SHELLCHECK_VER}/shellcheck-${SHELLCHECK_VER}.linux.x86_64.tar.xz" | |
tar -xf "shellcheck-${SHELLCHECK_VER}.linux.x86_64.tar.xz" | |
sudo mv "./shellcheck-${SHELLCHECK_VER}/shellcheck" "${{ github.action_path }}/shellcheck" | |
rm -rf "shellcheck-${SHELLCHECK_VER}" "shellcheck-${SHELLCHECK_VER}.linux.x86_64.tar.xz" | |
- name: Run Actionlint | |
shell: bash | |
run: | | |
go install github.com/rhysd/actionlint/cmd/actionlint@latest | |
actionlint | |
vendorhash: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} | |
token: ${{ !github.event.pull_request.head.repo.fork && secrets.UPLOSI_CI_COMMIT_PUSH_PR || '' }} | |
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26 | |
- name: Update uplosi vendor hash | |
run: nix run .#nixpkgs.nix-update -- --flake --version=skip uplosi | |
- name: Check diff | |
id: check-diff | |
run: | | |
diff=$(git diff) | |
if [[ -z "$diff" ]]; then | |
echo "Everything is tidy and generated." | |
exit 0 | |
fi | |
cat << EOF >> "${GITHUB_STEP_SUMMARY}" | |
\`\`\`diff | |
${diff} | |
\`\`\` | |
EOF | |
echo "::error::vendorHash out of date" | |
exit 1 | |
- name: Push changes | |
if: | | |
failure() && | |
(steps.check-diff.conclusion == 'failure') && | |
startsWith(github.head_ref, 'renovate/') && | |
(!github.event.pull_request.head.repo.fork) | |
run: | | |
git config --global user.name "edgelessci" | |
git config --global user.email "[email protected]" | |
git commit -am "flake: update uplosi vendorHash" | |
git push |