Skip to content

Bump js-yaml in /samples/nodejs-react-postgres/client #311

Bump js-yaml in /samples/nodejs-react-postgres/client

Bump js-yaml in /samples/nodejs-react-postgres/client #311

name: Trigger Docs Samples Rebuild
permissions:
contents: read
pull-requests: read
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- "**"
paths:
- "samples/**"
jobs:
# python-lint:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Get list of changed files
# id: changed
# run: |
# files=$(git diff --name-only origin/${{ github.base_ref }}...${{ github.head_ref }} | grep '\.py$' || true)
# echo "files=$files" >> "$GITHUB_OUTPUT"
# - name: Run Ruff linter
# uses: astral-sh/ruff-action@v1
# with:
# args: check
# src: ${{ steps.changed.outputs.files }}
# - name: Run Ruff formatter check
# uses: astral-sh/ruff-action@v1
# with:
# args: "format --check"
# src: ${{ steps.changed.outputs.files }}
js-ts-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Get list of changed JS/TS files
id: changed_js
run: |
files=$(git diff --name-only origin/${{ github.base_ref }}...${{ github.head_ref }} | grep -E '\.(js|ts|jsx|tsx)$' || true)
echo "files=$files" >> "$GITHUB_OUTPUT"
- name: Run ESLint (JS/TS only)
run: |
if [ -n "${{ steps.changed_js.outputs.files }}" ]; then
npx eslint ${{ steps.changed_js.outputs.files }}
else
echo "No JS/TS files to lint."
fi
- name: Run Prettier check (JS/TS only)
run: |
if [ -n "${{ steps.changed_js.outputs.files }}" ]; then
npx prettier --check ${{ steps.changed_js.outputs.files }}
else
echo "No JS/TS files to format check."
fi
# go-lint:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Set up Golang
# uses: actions/setup-go@v5
# with:
# go-version: stable
# - name: Run golangci-lint
# uses: golangci/golangci-lint-action@v8
# with:
# args: --enable gofmt --enable goimports
# only-new-issues: true
# version: latest
build-json:
runs-on: ubuntu-latest
# needs: [python-lint, js-ts-lint, go-lint]
needs: [js-ts-lint]
steps:
- name: Trigger CLI Autodoc
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.DOCS_ACTION_TRIGGER_TOKEN }}
repository: DefangLabs/defang-docs
event-type: sample-update