Skip to content

Commit

Permalink
test workflow with new pushes
Browse files Browse the repository at this point in the history
Signed-off-by: Mingshi Liu <[email protected]>
  • Loading branch information
mingshl committed May 26, 2023
1 parent 0d7c713 commit 5cca330
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/remote-integ-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ jobs:

- uses: actions/checkout@v2
- name: Fetch Version Information
id: fetch version
id: fetch_version
run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
pr_number=$(curl -sSL -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/commits/${{ github.sha }}/pulls" \
| jq -r '.[0].number')
url_number=$(curl -sSL -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/commits/${{ github.sha }}/pulls" \
| jq -r '.[0].url')
pr_data=$(curl -sSL -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/pulls/$pr_number")
url_number)
BRANCH_NAME=$(echo "$pr_data" | jq -r '.base.ref')
echo "BRANCH_NAME is $BRANCH_NAME"
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
Expand All @@ -55,7 +58,7 @@ jobs:
echo "OPENSEARCH_DASHBOARDS_VERSION=$BRANCH_NAME" >> $GITHUB_ENV
echo "OPENSEARCH_DASHBOARDS_FTREPO_VERSION=$BRANCH_NAME" >> $GITHUB_ENV
echo "SEARCH_PROCESSOR_PLUGIN_VERSION=$BRANCH_NAME" >> $GITHUB_ENV
shell: bash

- name: Enable longer filenames
if: ${{ matrix.os == 'windows-latest' }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ jobs:
pr_number=$(curl -sSL -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/commits/${{ github.sha }}/pulls" \
| jq -r '.[0].number')
url_number=$(curl -sSL -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/commits/${{ github.sha }}/pulls" \
| jq -r '.[0].url')
pr_data=$(curl -sSL -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/pulls/$pr_number")
BRANCH_NAME=$(echo "$pr_data" | jq -r '.base.ref')
url_number)
echo "BRANCH_NAME is $BRANCH_NAME"
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "Base branch name is "${{ github.event.pull_request.base.ref }}""
Expand Down

0 comments on commit 5cca330

Please sign in to comment.