@@ -987,17 +987,17 @@ jobs:
987987 shell : bash
988988 run : |
989989 python3.7 -m pip install poetry==1.5.1
990+ export POETRY_REPOSITORIES_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_URL=https://github.com/splunk/addonfactory-ucc-test.git
991+ export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_USERNAME=${{ secrets.SA_GH_USER_NAME }}
992+ export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_PASSWORD=${{ secrets.GH_TOKEN_ADMIN }}
993+ git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com
994+ git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf ssh://git@github.com
990995 - name : modinput-test-prerequisites
991996 if : steps.download-openapi.conclusion != 'skipped'
992997 shell : bash
993998 env :
994999 PYTHON_KEYRING_BACKEND : keyring.backends.null.Keyring
9951000 run : |
996- export POETRY_REPOSITORIES_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_URL=https://github.com/splunk/addonfactory-ucc-test.git
997- export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_USERNAME=${{ secrets.SA_GH_USER_NAME }}
998- export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_PASSWORD=${{ secrets.GH_TOKEN_ADMIN }}
999- git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com
1000- git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf ssh://git@github.com
10011001 poetry install --only modinput
10021002 if [ -f "tests/ucc_modinput_functional/tmp/openapi.json" ]; then
10031003 poetry run ucc-test-modinput -o tests/ucc_modinput_functional/tmp/openapi.json -t ${{ steps.download-openapi.outputs.download-path }}/tmp/
@@ -2897,9 +2897,11 @@ jobs:
28972897 pre-publish :
28982898 if : ${{ !cancelled() }}
28992899 # The following line will rename 'pre-publish' to 'pre-publish-not_main_pr' when PR is created towards main branch
2900- # It is necessary to avoid confusion caused by githubactions considering pre-publish for both push to develop branch
2900+ # It is necessary to avoid confusion caused by github actions considering pre-publish for both push to develop branch
29012901 # and pull_request to main branch events.
29022902 name : ${{ github.event_name == 'pull_request' && github.base_ref == 'main' && 'pre-publish' || 'pre-publish-not_main_pr' }}
2903+ outputs :
2904+ run-publish : ${{ steps.check.outputs.run-publish }}
29032905 needs :
29042906 - validate-custom-version
29052907 - meta
@@ -2929,17 +2931,14 @@ jobs:
29292931 if [[ "$RUN_PUBLISH" != *'false'* ]]
29302932 then
29312933 echo "run-publish=true" >> "$GITHUB_OUTPUT"
2934+ echo "Publish conditions are met."
29322935 else
29332936 echo "run-publish=false" >> "$GITHUB_OUTPUT"
2937+ echo "Publish conditions are not met."
29342938 fi
2935- - name : exit without publish
2936- if : ${{ steps.check.outputs.run-publish == 'false' || ( github.event.action == 'labeled') }}
2937- run : |
2938- echo "Expand check step to see which job has failed pre-publish step."
2939- exit 1
29402939
29412940 publish :
2942- if : ${{ !cancelled() && needs.pre-publish.result == 'success ' && (github.event_name == 'push' || needs.validate-custom-version.result == 'success') }}
2941+ if : ${{ !cancelled() && needs.pre-publish.outputs.run-publish == 'true ' && (github.event_name == 'push' || needs.validate-custom-version.result == 'success') }}
29432942 name : ${{ github.event.inputs.custom-version == '' && 'publish' || 'publish-custom-version' }}
29442943 needs :
29452944 - pre-publish
0 commit comments