Skip to content

Commit

Permalink
add as working directory and specify env
Browse files Browse the repository at this point in the history
Signed-off-by: Eric <[email protected]>
  • Loading branch information
mengweieric committed Dec 19, 2023
1 parent c35de42 commit 84f4cc1
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ name: Lint

on: [push, pull_request]

env:
PLUGIN_NAME: dashboards-observability
OPENSEARCH_DASHBOARDS_VERSION: 'main'

jobs:
build:
name: Lint
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
statuses: write

steps:
- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v2
Expand All @@ -23,7 +22,7 @@ jobs:
- name: Checkout dashboards observability
uses: actions/checkout@v2
with:
path: OpenSearch-Dashboards/plugins/dashboards-observability
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}

- name: Get node and yarn versions
working-directory: ${{ env.WORKING_DIR }}
Expand All @@ -45,13 +44,13 @@ jobs:
npm i -g yarn@${{ steps.versions_step.outputs.yarn_version }}
- name: Bootstrap the plugin
run: |
cd OpenSearch-Dashboards/plugins/dashboards-observability
working-directory: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
run:
yarn osd bootstrap

- name: lint code base
working-directory: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
run: |
cd OpenSearch-Dashboards/plugins/dashboards-observability
git fetch origin main
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB origin/main | grep -E "\.(js|ts|tsx)$")
if [ -n "$CHANGED_FILES" ]; then
Expand Down

0 comments on commit 84f4cc1

Please sign in to comment.