Skip to content

Commit 561b6f2

Browse files
authored
fix(ci): fix trigger version capture
1 parent cdfee16 commit 561b6f2

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

.github/workflows/trigger-deploy.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,9 @@ jobs:
4545
id: deploy-staging
4646
working-directory: ./apps/sim
4747
run: |
48-
OUTPUT=$(npx --yes trigger.dev@4.0.4 deploy -e staging --skip-promotion 2>&1)
49-
echo "$OUTPUT"
50-
VERSION=$(echo "$OUTPUT" | grep -oP 'Successfully deployed version \K[0-9]+\.[0-9]+' || echo "$OUTPUT" | grep -oP 'version \K[0-9]+\.[0-9]+' | head -1)
51-
echo "version=$VERSION" >> $GITHUB_OUTPUT
52-
echo "Deployed version: $VERSION"
48+
npx --yes trigger.dev@4.0.4 deploy -e staging --skip-promotion
49+
echo "version=$TRIGGER_DEPLOYMENT_VERSION" >> $GITHUB_OUTPUT
50+
echo "Deployed version: $TRIGGER_DEPLOYMENT_VERSION"
5351
5452
- name: Store Staging version in Parameter Store
5553
if: github.ref == 'refs/heads/staging'
@@ -65,11 +63,9 @@ jobs:
6563
id: deploy-production
6664
working-directory: ./apps/sim
6765
run: |
68-
OUTPUT=$(npx --yes trigger.dev@4.0.4 deploy --skip-promotion 2>&1)
69-
echo "$OUTPUT"
70-
VERSION=$(echo "$OUTPUT" | grep -oP 'Successfully deployed version \K[0-9]+\.[0-9]+' || echo "$OUTPUT" | grep -oP 'version \K[0-9]+\.[0-9]+' | head -1)
71-
echo "version=$VERSION" >> $GITHUB_OUTPUT
72-
echo "Deployed version: $VERSION"
66+
npx --yes trigger.dev@4.0.4 deploy --skip-promotion
67+
echo "version=$TRIGGER_DEPLOYMENT_VERSION" >> $GITHUB_OUTPUT
68+
echo "Deployed version: $TRIGGER_DEPLOYMENT_VERSION"
7369
7470
- name: Store Production version in Parameter Store
7571
if: github.ref == 'refs/heads/main'

0 commit comments

Comments
 (0)