Skip to content

Commit fb136c4

Browse files
committed
Production deployments use tag name as ref
So that deployment notifications in Slack bear more context.
1 parent e21ef75 commit fb136c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/build-and-trigger-deploy.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ jobs:
7878
run: >
7979
if [ "${GITHUB_EVENT_NAME}" = push ]; then
8080
ENV=staging
81+
REF=${GITHUB_SHA}
8182
else
8283
ENV=production
84+
REF=${GITHUB_REF}
8385
fi;
84-
curl -sd "{\"ref\":\"${GITHUB_SHA}\",\"required_contexts\":[],\"environment\":\"${ENV}\",\"payload\":{\"version\":\"$(cat version/version)\"}}" https://api.github.com/repos/${GITHUB_REPOSITORY}/deployments -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}"
86+
curl -sd "{\"ref\":\"${REF}\",\"required_contexts\":[],\"environment\":\"${ENV}\",\"payload\":{\"version\":\"$(cat version/version)\"}}" https://api.github.com/repos/${GITHUB_REPOSITORY}/deployments -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)