Skip to content

Commit

Permalink
OSD restrict version increment files
Browse files Browse the repository at this point in the history
Signed-off-by: Prudhvi Godithi <[email protected]>
  • Loading branch information
prudhvigodithi committed Dec 28, 2023
1 parent 6eecb4a commit 8c6ea23
Showing 1 changed file with 7 additions and 30 deletions.
37 changes: 7 additions & 30 deletions .github/workflows/osd-increment-plugin-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 }}";
Expand Down Expand Up @@ -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: |
Expand All @@ -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 }}"
Expand Down

0 comments on commit 8c6ea23

Please sign in to comment.