4747 if : needs.docker-configured.outputs.enabled == 'true' && ((github.event.label && github.event.label.name == 'docker') || github.event_name != 'pull_request')
4848 runs-on : ubuntu-latest
4949 steps :
50+ - id : campfire-configured
51+ env :
52+ CAMPFIRE_MESSAGES_URL : ${{ secrets.CAMPFIRE_MESSAGES_URL }}
53+ run : |
54+ if [ -n "${CAMPFIRE_MESSAGES_URL}" ]; then
55+ echo "configured=true" >> "$GITHUB_OUTPUT"
56+ else
57+ echo "configured=false" >> "$GITHUB_OUTPUT"
58+ fi
59+
5060 - name : Checkout
5161 uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
5262 with :
95105 type=gha,mode=max
96106
97107 - name : Post job failure details to Campfire
98- if : failure() && secrets.CAMPFIRE_MESSAGES_URL != ' ' && github.ref == 'refs/heads/master'
108+ if : failure() && steps.campfire-configured.outputs.configured == 'true ' && github.ref == 'refs/heads/master'
99109 continue-on-error : true
100110 uses : shane-lamb/campfire-notify-action@df63cf73810147306276e281bedccf71c1519caf # v1.1.6
101111 with :
@@ -108,6 +118,16 @@ jobs:
108118 if : needs.docker-configured.outputs.enabled == 'true' && ((github.event.label && github.event.label.name == 'docker') || github.event_name != 'pull_request')
109119 runs-on : ubuntu-latest
110120 steps :
121+ - id : campfire-configured
122+ env :
123+ CAMPFIRE_MESSAGES_URL : ${{ secrets.CAMPFIRE_MESSAGES_URL }}
124+ run : |
125+ if [ -n "${CAMPFIRE_MESSAGES_URL}" ]; then
126+ echo "configured=true" >> "$GITHUB_OUTPUT"
127+ else
128+ echo "configured=false" >> "$GITHUB_OUTPUT"
129+ fi
130+
111131 - name : Checkout
112132 uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
113133 with :
@@ -161,7 +181,7 @@ jobs:
161181 type=gha,mode=max
162182
163183 - name : Post job failure details to Campfire
164- if : failure() && secrets.CAMPFIRE_MESSAGES_URL != ' ' && github.ref == 'refs/heads/master'
184+ if : failure() && steps.campfire-configured.outputs.configured == 'true ' && github.ref == 'refs/heads/master'
165185 continue-on-error : true
166186 uses : shane-lamb/campfire-notify-action@df63cf73810147306276e281bedccf71c1519caf # v1.1.6
167187 with :
@@ -173,6 +193,16 @@ jobs:
173193 if : needs.docker-configured.outputs.enabled == 'true' && ((github.event.label && github.event.label.name == 'docker') || github.event_name != 'pull_request')
174194 runs-on : ubuntu-latest
175195 steps :
196+ - id : campfire-configured
197+ env :
198+ CAMPFIRE_MESSAGES_URL : ${{ secrets.CAMPFIRE_MESSAGES_URL }}
199+ run : |
200+ if [ -n "${CAMPFIRE_MESSAGES_URL}" ]; then
201+ echo "configured=true" >> "$GITHUB_OUTPUT"
202+ else
203+ echo "configured=false" >> "$GITHUB_OUTPUT"
204+ fi
205+
176206 - name : Checkout
177207 uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
178208 with :
@@ -226,7 +256,7 @@ jobs:
226256 type=gha,mode=max
227257
228258 - name : Post job failure details to Campfire
229- if : failure() && secrets.CAMPFIRE_MESSAGES_URL != ' ' && github.ref == 'refs/heads/master'
259+ if : failure() && steps.campfire-configured.outputs.configured == 'true ' && github.ref == 'refs/heads/master'
230260 continue-on-error : true
231261 uses : shane-lamb/campfire-notify-action@df63cf73810147306276e281bedccf71c1519caf # v1.1.6
232262 with :
0 commit comments