From 8c6ea23a7390294b0cc8f4750c94d52a6c24471f Mon Sep 17 00:00:00 2001 From: Prudhvi Godithi Date: Thu, 28 Dec 2023 13:07:00 -0800 Subject: [PATCH] OSD restrict version increment files Signed-off-by: Prudhvi Godithi --- .../osd-increment-plugin-versions.yml | 37 ++++--------------- 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/.github/workflows/osd-increment-plugin-versions.yml b/.github/workflows/osd-increment-plugin-versions.yml index 10847faad0..6eb439dd28 100644 --- a/.github/workflows/osd-increment-plugin-versions.yml +++ b/.github/workflows/osd-increment-plugin-versions.yml @@ -17,7 +17,7 @@ on: - debug jobs: plugin-version-increment-sync: - if: github.repository == 'opensearch-project/opensearch-build' + if: github.repository == 'prudhvigodithi/opensearch-build' runs-on: ubuntu-latest strategy: fail-fast: false @@ -25,29 +25,10 @@ jobs: entry: # Adding the core repo OpenSearch-Dashboards for the label creation automation - {repo: OpenSearch-Dashboards} - - {repo: dashboards-observability} - - {repo: dashboards-reporting} - - {repo: dashboards-visualizations, path: gantt-chart} - - {repo: dashboards-query-workbench} - - {repo: dashboards-maps} - - {repo: anomaly-detection-dashboards-plugin} - - {repo: ml-commons-dashboards} - - {repo: index-management-dashboards-plugin} - - {repo: dashboards-notifications} - - {repo: alerting-dashboards-plugin} - - {repo: security-analytics-dashboards-plugin} - - {repo: security-dashboards-plugin} - {repo: dashboards-search-relevance} - - {repo: opensearch-dashboards-functional-test} branch: - - '1.3' - - 2.x - - '2.8' - main - '2.9' - - '2.10' - - '2.11' - - '2.12' steps: - name: Check out OpenSearch Dashboards repo uses: actions/checkout@v3 @@ -59,7 +40,7 @@ jobs: if: ${{ matrix.entry.repo != 'OpenSearch-Dashboards' }} uses: actions/checkout@v3 with: - repository: opensearch-project/${{ matrix.entry.repo }} + repository: prudhvigodithi/${{ matrix.entry.repo }} ref: ${{ matrix.branch }} path: OpenSearch-Dashboards/plugins/${{ matrix.entry.repo }} - name: Setup Node @@ -103,18 +84,11 @@ jobs: OSD_PLUGIN_VERSION=$(node -p "require('./package.json').version") echo "OSD_PLUGIN_VERSION=$OSD_PLUGIN_VERSION" >> $GITHUB_ENV fi - - name: GitHub App token - id: github_app_token - uses: tibdex/github-app-token@v1.6.0 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.APP_PRIVATE_KEY }} - installation_id: 22958780 - name: Check if label exists id: check_label uses: actions/github-script@v6 with: - github-token: ${{ steps.github_app_token.outputs.token }} + github-token: ${{ secrets.PAT }} result-encoding: string script: | const labelName = "v${{ env.DASHBOARD_VERSION }}"; @@ -149,7 +123,7 @@ jobs: id: cpr uses: peter-evans/create-pull-request@v5 with: - token: ${{ steps.github_app_token.outputs.token }} + token: ${{ secrets.PAT }} committer: opensearch-ci-bot author: opensearch-ci-bot commit-message: | @@ -164,6 +138,9 @@ jobs: body: | - Incremented version to **${{ env.OSD_PLUGIN_VERSION }}**. path: 'OpenSearch-Dashboards/plugins/${{ matrix.entry.repo }}' + add-paths: | + opensearch_dashboards.json + package.json - name: Check outputs run: |- echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"