Skip to content

Commit 382bd6c

Browse files
committed
update conditions
1 parent 32b9986 commit 382bd6c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/actions/configure-goproxy/action.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ runs:
88
id: configure-goproxy
99
shell: bash
1010
run: |
11-
if [[ "${{ secrets.ARTIFACTORY_USER }}" == "" ]]; then
12-
echo "No Artifactory secrets available - using direct GOPROXY"
13-
GOPROXY_VALUE="direct"
14-
elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ ("${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "schedule") && ("${{ github.ref }}" == "refs/heads/main" || "${{ github.ref }}" =~ ^refs/heads/release-) ]]; then
15-
echo "Production mode - using production Artifactory"
16-
GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_ENDPOINT }}"
11+
if [[ "${{ secrets.ARTIFACTORY_USER }}" == "" ]] ||
12+
[[ ${{ github.event.pull_request.head.repo.fork }} ]] ||
13+
[[ ${{ startsWith(github.head_ref, 'dependabot-')}} ]] ; then
14+
echo "No Artifactory secrets available - using direct GOPROXY"
15+
GOPROXY_VALUE="direct"
1716
else
18-
echo "Development mode - using dev Artifactory"
19-
GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_DEV_ENDPOINT }}"
17+
echo "Development mode - using dev Artifactory"
18+
GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_URL }}"
2019
fi
2120
echo "GOPROXY=${GOPROXY_VALUE}" >> $GITHUB_ENV
2221

0 commit comments

Comments
 (0)