Update lint.yml (#7) #8
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: | ||
pull_request: | ||
branches: | ||
- main | ||
- docusaurus-v** | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
jobs: | ||
lint: | ||
name: Lint | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Set up Node | ||
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | ||
with: | ||
node-version: lts/* | ||
cache: yarn | ||
- name: Installation | ||
run: yarn | ||
# run: yarn install --immutable # Fails if yarn.lock is modified (unfortunately only works for Yarn 2, and --frozen-lockfile is not the same!) | ||
- name: Check immutable yarn.lock | ||
run: git diff --exit-code | ||
- name: Check for suspicious yarn.lock | ||
# for allowed aliases, see https://github.com/yargs/cliui/pull/139/files#r1670711112 | ||
run: yarn lockfile-lint --path yarn.lock --type yarn --allowed-hosts yarn --validate-https --validate-package-names --validate-integrity --empty-hostname=false --allowed-package-name-aliases serve-handler react-loadable string-width-cjs strip-ansi-cjs wrap-ansi-cjs | ||
- name: Lint | ||
run: | | ||
echo "::add-matcher::.github/workflows/cspell-problem-matcher.json" | ||
yarn lint:ci | ||
- name: Prettier Code | ||
run: yarn format:diff | ||
- name: Prettier Fix | ||
uses: WorkOfStan/prettier-fix@v1.0.0 | ||
- name: Action Conventional Commit Lint | ||
uses: khulnasoft-lab/action-commit-lint@v2.1.7 | ||
name: commit-lint | ||
on: [push, pull_request] | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: khulnasoft-lab/action-commit-lint@v2 | ||
with: | ||
config: ./path/to/commitlint.config | ||
on: | ||
workflow_run: | ||
workflows: | ||
- Auto Review Bot Trigger | ||
types: | ||
- completed | ||
name: Auto Review Bot | ||
jobs: | ||
auto-review-bot: | ||
runs-on: ubuntu-latest | ||
name: Run | ||
steps: | ||
- name: Fetch PR Number | ||
uses: dawidd6/action-download-artifact@6765a42d86407a3d532749069ac03705ad82ebc6 | ||
with: | ||
name: pr-number | ||
workflow: auto-review-trigger.yml | ||
run_id: ${{ github.event.workflow_run.id }} | ||
- name: Save PR Number | ||
id: save-pr-number | ||
run: echo "::set-output name=pr::$(cat pr-number.txt)" | ||
- name: Checkout | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b | ||
with: | ||
repository: ethereum/EIPs # Default, but best to be explicit here | ||
ref: master | ||
- name: Setup Node.js Environment | ||
uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 | ||
with: | ||
node-version: 16 | ||
- name: Auto Review Bot | ||
id: auto-review-bot | ||
uses: ethereum/EIP-Bot@1e1bb6a58e02d28e9afa9462b00a518d9b47860e # dist | ||
with: | ||
GITHUB-TOKEN: ${{ secrets.TOKEN }} | ||
PR_NUMBER: ${{ steps.save-pr-number.outputs.pr }} | ||
CORE_EDITORS: '@MicahZoltu,@lightclient,@axic,@gcolvin,@SamWilsn,@Pandapip1' | ||
ERC_EDITORS: '@lightclient,@axic,@SamWilsn,@Pandapip1' | ||
NETWORKING_EDITORS: '@MicahZoltu,@lightclient,@axic,@SamWilsn' | ||
INTERFACE_EDITORS: '@lightclient,@axic,@SamWilsn,@Pandapip1' | ||
META_EDITORS: '@lightclient,@axic,@gcolvin,@SamWilsn,@Pandapip1' | ||
INFORMATIONAL_EDITORS: '@lightclient,@axic,@gcolvin,@SamWilsn,@Pandapip1' | ||
MAINTAINERS: '@alita-moore,@mryalamanchi' | ||
- name: Enable Auto-Merge | ||
uses: reitermarkus/automerge@a25ea0de41019ad13380d22e01db8f5638f1bcdc | ||
with: | ||
token: ${{ secrets.TOKEN }} | ||
pull-request: ${{ steps.save-pr-number.outputs.pr }} | ||
- name: Submit Approval | ||
uses: hmarr/auto-approve-action@24ec4c8cc344fe1cdde70ff37e55ace9e848a1d8 | ||
with: | ||
github-token: ${{ secrets.TOKEN }} | ||
pull-request-number: ${{ steps.save-pr-number.outputs.pr }} |