File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change 89
89
accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
90
90
command : pages deploy build/client --branch=${{ github.head_ref || github.ref_name }} --project-name=dispoflare
91
91
92
+ - name : Check for Sentry availability
93
+ id : sentry-check
94
+ shell : bash
95
+ run : |
96
+ if [ "${{ secrets.SENTRY_DSN }}" != '' ]; then
97
+ echo "sentry=true" >> $GITHUB_OUTPUT;
98
+ else
99
+ echo "sentry=false" >> $GITHUB_OUTPUT;
100
+ fi
101
+
102
+ - name : Setup Sentry
103
+ uses :
cloudflare/[email protected]
104
+ if : ${{ steps.sentry-check.outputs.sentry == 'true' }}
105
+ with :
106
+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
107
+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
108
+ command : --version
109
+ secrets : |
110
+ SENTRY_DSN
111
+ env :
112
+ SENTRY_DSN : ${{ secrets.SENTRY_DSN }}
113
+
92
114
- name : Publish to Cloudflare Workers
93
115
uses :
cloudflare/[email protected]
94
116
with :
@@ -97,15 +119,14 @@ jobs:
97
119
secrets : |
98
120
CLOUDFLARE_API_TOKEN
99
121
CLOUDFLARE_ACCOUNT_ID
100
- SENTRY_DSN
101
122
env :
102
123
CLOUDFLARE_API_TOKEN : ${{ secrets.CLOUDFLARE_API_TOKEN }}
103
124
CLOUDFLARE_ACCOUNT_ID : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
104
- SENTRY_DSN : ${{ secrets.SENTRY_DSN }}
105
125
106
126
- name : Create a Sentry release
107
127
uses : getsentry/action-release@v1
108
128
continue-on-error : true
129
+ if : ${{ steps.sentry-check.outputs.sentry == 'true' }}
109
130
env :
110
131
SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
111
132
SENTRY_ORG : ${{ secrets.SENTRY_ORG }}
You can’t perform that action at this time.
0 commit comments