vault/.github/workflows/enos-lint.yml
Vault Automation 00281521f0
actions: pin actions to the latest versions
* actions: pin to latest actions

- actions/checkout@9c091bb21b => v7.0.0
  Adds a guardrail to prevent accidentally checking out fork pull
  request code in privileged GitHub Actions contexts
  (pull_request_target and PR-triggered workflow_run), with an
  explicit opt-in escape hatch for advanced workflows.

- pnpm/action-setup@0ebf47130e => v6.0.9
  Update pnpm to v11.7.0

- Add .github/actions/build-ui to ui changed files group

- Add .github/actions/build-ui to ui/frontend CODEOWNERS

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2026-06-23 10:21:26 -06:00

55 lines
2.1 KiB
YAML

---
name: lint-enos
on:
pull_request:
paths:
- enos/**
jobs:
metadata:
# Only run this workflow on pull requests from hashicorp/vault branches
# as we need secrets to install enos.
if: "! github.event.pull_request.head.repo.fork"
name: metadata
runs-on: ${{ github.repository == 'hashicorp/vault' && 'ubuntu-latest' || fromJSON('["self-hosted","ubuntu-22.04-x64"]') }}
outputs:
runs-on: ${{ steps.metadata.outputs.runs-on }}
version: ${{ steps.metadata.outputs.version }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- id: set-product-version
uses: hashicorp/actions-set-product-version@d9be602dfa87e201c79a3937c038f19391c9a430 # v2.0.2
with:
checkout: false # There's no need to check out again
- id: metadata
run: |
echo "version=${{ steps.set-product-version.outputs.product-version }}" >> "$GITHUB_OUTPUT"
github_repository="${{ github.repository }}"
if [ "${github_repository##*/}" == "vault-enterprise" ] ; then
echo 'runs-on=["self-hosted","ubuntu-22.04-x64","large"]' >> "$GITHUB_OUTPUT"
else
echo 'runs-on="custom-linux-xl-vault-latest"' >> "$GITHUB_OUTPUT"
fi
lint:
needs: metadata
runs-on: ${{ fromJSON(needs.metadata.outputs.runs-on) }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/set-up-go
with:
no-restore: true
no-save: true
- uses: ./.github/actions/install-tools
- uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
with:
terraform_wrapper: false
- uses: hashicorp/action-setup-enos@3817610f3f8dc74a8dbe15bc23c6dc3164f9b224 # v1.53
- name: Ensure shellcheck is available for linting
run: which shellcheck || (sudo apt update && sudo apt install -y shellcheck)
- name: lint
working-directory: ./enos
env:
ENOS_VAR_vault_product_version: ${{ needs.metadata.outputs.version }}
run: make lint