@@ -987,17 +987,17 @@ jobs:
987
987
shell : bash
988
988
run : |
989
989
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://[email protected]
990
995
- name : modinput-test-prerequisites
991
996
if : steps.download-openapi.conclusion != 'skipped'
992
997
shell : bash
993
998
env :
994
999
PYTHON_KEYRING_BACKEND : keyring.backends.null.Keyring
995
1000
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://[email protected]
1001
1001
poetry install --only modinput
1002
1002
if [ -f "tests/ucc_modinput_functional/tmp/openapi.json" ]; then
1003
1003
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:
2897
2897
pre-publish :
2898
2898
if : ${{ !cancelled() }}
2899
2899
# 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
2901
2901
# and pull_request to main branch events.
2902
2902
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 }}
2903
2905
needs :
2904
2906
- validate-custom-version
2905
2907
- meta
@@ -2929,17 +2931,14 @@ jobs:
2929
2931
if [[ "$RUN_PUBLISH" != *'false'* ]]
2930
2932
then
2931
2933
echo "run-publish=true" >> "$GITHUB_OUTPUT"
2934
+ echo "Publish conditions are met."
2932
2935
else
2933
2936
echo "run-publish=false" >> "$GITHUB_OUTPUT"
2937
+ echo "Publish conditions are not met."
2934
2938
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
2940
2939
2941
2940
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') }}
2943
2942
name : ${{ github.event.inputs.custom-version == '' && 'publish' || 'publish-custom-version' }}
2944
2943
needs :
2945
2944
- pre-publish
0 commit comments