Skip to content

Instantly share code, notes, and snippets.

@TownLake
Created June 21, 2020 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TownLake/3527a831a5681f5b632724a5a8f58081 to your computer and use it in GitHub Desktop.
Save TownLake/3527a831a5681f5b632724a5a8f58081 to your computer and use it in GitHub Desktop.
- name: update policy
run: |
curl ${{ env.PUT_POL }} ${{ env.CURL_AUTH }} ${{ env.CURL_CONTENT }} ${{ env.CURL_DATA_UPOL }}
env:
PUT_POL: '-X PUT "https://api.cloudflare.com/client/v4/zones/${{ env.ZONE_TAG }}/access/apps/${{ env.APP_UID }}/policies/${{ env.POL_UID }}"'
CURL_DATA_UPOL: --data '{"precedence":1,"decision":"allow","name":"Allow team","include":[{"email":{"email":"update@example.com"}},{"email":{"email":"srhea@cloudflare.com"}}]}'
if: env.APP_STATE == '11010'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment