File tree Expand file tree Collapse file tree 4 files changed +23
-4
lines changed
actions/re-load-dev-portal Expand file tree Collapse file tree 4 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,14 @@ inputs:
1212 description : ' Head SHA for changed files comparison'
1313 required : true
1414 type : string
15+ dev-portal-deploy-hook-prod :
16+ description : ' Dev portal deploy hook token'
17+ required : true
18+ type : string
19+ revalidate-token :
20+ description : ' Revalidate token'
21+ required : true
22+ type : string
1523
1624runs :
1725 using : " composite"
@@ -26,31 +34,36 @@ runs:
2634 sha : ${{ inputs.head_sha }}
2735
2836 - name : Print changed files
37+ shell : bash
2938 run : |
3039 echo "Changed files:"
3140 echo ${{ steps.changed-files.outputs.all_changed_files }}
3241
3342 - name :
3443 if : steps.changed-files.outputs.all_changed_files == ''
44+ shell : bash
3545 run : |
3646 echo "No changed files found, redeploying dev-portal in case of api changes"
37- curl -X POST ${{ secrets.DEV_PORTAL_DEPLOY_HOOK_PROD }}
47+ curl -X POST ${{ inputs.dev-portal-deploy-hook-prod }}
3848 exit 0
3949
4050 - name : Map files to URLs
4151 id : map-files
52+ shell : bash
4253 run : |
43- FILES_URLS=$(node ./scripts/map-files-to-urls.mjs ${{ needs.get- changed-files.outputs.changed_files }})
54+ FILES_URLS=$(node ./scripts/map-files-to-urls.mjs ${{ steps. changed-files.outputs.all_changed_files }})
4455 echo "FILES_URLS=$FILES_URLS" >> $GITHUB_OUTPUT
4556
4657 - name : Print urls
58+ shell : bash
4759 run : echo ${{ steps.map-files.outputs.FILES_URLS }}
4860
4961 - name : Revalidate paths
5062 id : revalidate-paths
63+ shell : bash
5164 env :
5265 url : ' https://developer.hashicorp.com/api/revalidate/paths'
53- auth : ' Authorization: Bearer ${{ secrets.REVALIDATE_TOKEN }}'
66+ auth : ' Authorization: Bearer ${{ inputs.revalidate-token }}'
5467 run : |
5568 curl -X POST "${{ env.url }}" \
5669 -H "${{ env.auth }}" \
Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ jobs:
114114 with :
115115 base_sha : ${{ github.event.pull_request.base.sha }}
116116 head_sha : ${{ github.event.pull_request.head.sha }}
117+ dev-portal-deploy-hook-prod : ${{ secrets.DEV_PORTAL_DEPLOY_HOOK_PROD }}
118+ revalidate-token : ${{ secrets.REVALIDATE_TOKEN }}
117119
118120 deploy-dev-portal-preview :
119121 name : Deploy Dev Portal Preview
Original file line number Diff line number Diff line change 4747 with :
4848 base_sha : ${{ github.event.before }}
4949 head_sha : ${{ github.event.after }}
50+ dev-portal-deploy-hook-prod : ${{ secrets.DEV_PORTAL_DEPLOY_HOOK_PROD }}
51+ revalidate-token : ${{ secrets.REVALIDATE_TOKEN }}
Original file line number Diff line number Diff line change 2828 uses : ./.github/actions/re-load-dev-portal
2929 with :
3030 base_sha : ${{ inputs.base_sha }}
31- head_sha : ${{ inputs.head_sha }}
31+ head_sha : ${{ inputs.head_sha }}
32+ dev-portal-deploy-hook-prod : ${{ secrets.DEV_PORTAL_DEPLOY_HOOK_PROD }}
33+ revalidate-token : ${{ secrets.REVALIDATE_TOKEN }}
You can’t perform that action at this time.
0 commit comments