forked from opensearch-project/opensearch-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OSD restrict version increment files
Signed-off-by: Prudhvi Godithi <[email protected]>
- Loading branch information
1 parent
6eecb4a
commit 8c6ea23
Showing
1 changed file
with
7 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,37 +17,18 @@ 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 | ||
matrix: | ||
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/[email protected] | ||
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 <[email protected]> | ||
author: opensearch-ci-bot <[email protected]> | ||
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 }}" | ||
|