Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/actions/install-deps-github-script/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Install dependencies for github-script actions
description: Installs dependencies for github-script actions

runs:
using: composite

steps:
- uses: ./.github/actions/setup-node-install-deps
with:
# actions/github-script@v8 uses Node 24
node-version: 24.x
# "--no-audit": improves performance
# "--omit dev": not needed at runtime, improves performance
install-command: "npm ci --no-audit --omit dev"
working-directory: ./.github
11 changes: 2 additions & 9 deletions .github/workflows/arm-auto-signoff-code.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: ARM Auto SignOff - Analyze Code

on:
Expand Down Expand Up @@ -35,15 +35,8 @@
sparse-checkout: |
.github

- name: Setup Node 24 and install deps
uses: ./.github/actions/setup-node-install-deps
with:
# actions/github-script@v8 uses Node 24
node-version: 24.x
# "--no-audit": improves performance
# "--omit dev": not needed at runtime, improves performance
install-command: "npm ci --no-audit --omit dev"
working-directory: ./.github
- name: Install dependencies for github-script actions
uses: ./.github/actions/install-deps-github-script

# Output is "true" if PR contains only incremental changes to an existing TypeSpec RP
- id: incremental-typespec
Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/avocado-code.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: "Swagger Avocado - Analyze Code"

on:
Expand Down Expand Up @@ -66,19 +66,12 @@
TRAVIS_REPO_SLUG: ${{ github.repository }}
TRAVIS_PULL_REQUEST_SHA: ${{ github.sha }}

- name: Setup Node 24 and install deps (under .github)
if: ${{ always() && (steps.run-avocado.outputs.output-file) }}
uses: ./.github/actions/setup-node-install-deps
with:
# actions/github-script@v8 uses Node 24
node-version: 24.x
# "--no-audit": improves performance
# "--omit dev": not needed at runtime, improves performance
install-command: "npm ci --no-audit --omit dev"
working-directory: ./.github
- if: ${{ always() && (steps.run-avocado.outputs.output-file) }}
name: Install dependencies for github-script actions
uses: ./.github/actions/install-deps-github-script

- name: Generate job summary
if: ${{ always() && (steps.run-avocado.outputs.output-file) }}
- if: ${{ always() && (steps.run-avocado.outputs.output-file) }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

convention is if before name

name: Generate job summary
id: generate-job-summary
uses: actions/github-script@v8
with:
Expand All @@ -90,8 +83,8 @@
AVOCADO_OUTPUT_FILE: ${{ steps.run-avocado.outputs.output-file }}

# Used by other workflows like set-status
- name: Set job-summary artifact
if: ${{ always() && steps.generate-job-summary.outputs.summary }}
- if: ${{ always() && steps.generate-job-summary.outputs.summary }}
name: Set job-summary artifact
uses: actions/upload-artifact@v6
with:
name: job-summary
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/github-test.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: GitHub Actions - Test

on:
Expand Down Expand Up @@ -46,15 +46,8 @@
args: -color -verbose

- if: ${{ matrix.folder == '.github' }}
name: Setup Node 24 and install runtime deps
uses: ./.github/actions/setup-node-install-deps
with:
# actions/github-script@v8 uses Node 24
node-version: 24.x
# "--no-audit": improves performance
# "--omit dev": not needed at runtime, improves performance
install-command: "npm ci --no-audit --omit dev"
working-directory: ./${{ matrix.folder }}
name: Install dependencies for github-script actions
uses: ./.github/actions/install-deps-github-script

- if: ${{ matrix.folder == '.github' }}
name: Verify all modules are importable
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/sdk-breaking-change-labels.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: SDK Breaking Change Labels

on:
Expand Down Expand Up @@ -39,15 +39,8 @@
ADO_TOKEN=$(az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" -o tsv)
echo "ADO_TOKEN=$ADO_TOKEN" >> "$GITHUB_ENV"

- name: Setup Node 24 and install deps
uses: ./.github/actions/setup-node-install-deps
with:
# actions/github-script@v8 uses Node 24
node-version: 24.x
# "--no-audit": improves performance
# "--omit dev": not needed at runtime, improves performance
install-command: "npm ci --no-audit --omit dev"
working-directory: ./.github
- name: Install dependencies for github-script actions
uses: ./.github/actions/install-deps-github-script

- name: Get label and action
id: get-label-and-action
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/spec-gen-sdk-status.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: "SDK Validation Status"

on:
Expand Down Expand Up @@ -39,15 +39,8 @@
ADO_TOKEN=$(az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" -o tsv)
echo "ADO_TOKEN=$ADO_TOKEN" >> "$GITHUB_ENV"

- name: Setup Node 24 and install deps
uses: ./.github/actions/setup-node-install-deps
with:
# actions/github-script@v8 uses Node 24
node-version: 24.x
# "--no-audit": improves performance
# "--omit dev": not needed at runtime, improves performance
install-command: "npm ci --no-audit --omit dev"
working-directory: ./.github
- name: Install dependencies for github-script actions
uses: ./.github/actions/install-deps-github-script

- name: "SDK Validation Set Status"
id: sdk-validation-status
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/summarize-checks.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: "Summarize Checks"

on:
Expand Down Expand Up @@ -53,15 +53,8 @@
sparse-checkout: |
.github

- name: Setup Node 24 and install deps
uses: ./.github/actions/setup-node-install-deps
with:
# actions/github-script@v8 uses Node 24
node-version: 24.x
# "--no-audit": improves performance
# "--omit dev": not needed at runtime, improves performance
install-command: "npm ci --no-audit --omit dev"
working-directory: ./.github
- name: Install dependencies for github-script actions
uses: ./.github/actions/install-deps-github-script

- id: dump-trigger-metadata
name: Dump Trigger Metadata
Expand Down
Loading