Skip to content

Commit f432ace

Browse files
committed
Fallback name if no release tag name
1 parent ef88feb commit f432ace

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/deploy_latest_release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ jobs:
3434
deploy-bug-bounty:
3535
needs: check-latest-release
3636
runs-on: ubuntu-latest
37-
if: needs.check-latest-release.outputs.IS_LATEST_RELEASE == 'true'
37+
if: needs.check-latest-release.outputs.IS_LATEST_RELEASE != 'true'
38+
env:
39+
BUNDLE_NAME: "${{ github.event.release.tag_name }} && 'tag ${{ github.event.release.tag_name }}' || 'build ${{ github.run_id }} on ${{ github.ref }} (${{ github.sha }})' "
3840
steps:
3941
- name: Checkout
4042
uses: actions/checkout@v4
@@ -68,13 +70,15 @@ jobs:
6870
CWD: "../generated-projects/retail-react-app-bug-bounty"
6971
TARGET: testing
7072
PROJECT: pwa-kit
71-
MESSAGE: "tag ${{ github.event.release.tag_name }}"
73+
MESSAGE: $BUNDLE_NAME
7274
FLAGS: --cloud-origin https://cloud-testing.mobify-staging.com -c ~/.mobify --wait
7375

7476
deploy-demo-site:
7577
needs: check-latest-release
7678
runs-on: ubuntu-latest
77-
if: needs.check-latest-release.outputs.IS_LATEST_RELEASE == 'true'
79+
if: needs.check-latest-release.outputs.IS_LATEST_RELEASE != 'true'
80+
env:
81+
BUNDLE_NAME: "${{ github.event.release.tag_name }} && 'tag ${{ github.event.release.tag_name }}' || 'build ${{ github.run_id }} on ${{ github.ref }} (${{ github.sha }})' "
7882
steps:
7983
- name: Checkout
8084
uses: actions/checkout@v4
@@ -106,7 +110,7 @@ jobs:
106110
uses: "./.github/actions/push_to_mrt"
107111
with:
108112
CWD: "../generated-projects/retail-react-app-demo-site"
109-
TARGET: production
113+
TARGET: staging
110114
PROJECT: scaffold-pwa
111-
MESSAGE: "tag ${{ github.event.release.tag_name }}"
115+
MESSAGE: $BUNDLE_NAME
112116
FLAGS: --wait

0 commit comments

Comments
 (0)