Skip to content

Commit 0c28536

Browse files
committed
Test version check
1 parent ba8b951 commit 0c28536

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/bug_bounty.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,40 @@ jobs:
1212
- name: Checkout
1313
uses: actions/checkout@v4
1414

15-
- name: Setup Node
16-
uses: actions/setup-node@v4
15+
# Uses https://github.com/marketplace/actions/version-check to check the version number on npm
16+
# If the version number is new, we kick off the rest of the build
17+
- name: Check npm version
18+
id: check
19+
uses: EndBug/version-check@v2
1720
with:
18-
node-version: ${{ matrix.node }}
19-
cache: npm
21+
file-url: https://www.npmjs.com/package/@salesforce/retail-react-app@latest/package.json
22+
static-checking: localIsNew
2023

21-
- name: Update NPM version
22-
if: env.IS_DEFAULT_NPM == 'false'
23-
run: |-
24-
npm install -g npm@${{ matrix.npm }}
24+
- name: Detect version update
25+
if: steps.check.outputs.changed == 'false'
26+
run: 'echo "Version change NOT found! New version: ${{ steps.check.outputs.version }}"'
2527

2628
- name: Install Monorepo Dependencies
29+
if: steps.check.outputs.changed == 'false'
2730
run: |-
2831
# Install node dependencies
2932
node ./scripts/gtime.js monorepo_install npm ci
3033
3134
- name: Generate Retail App Demo
35+
if: steps.check.outputs.changed == 'false'
3236
uses: ./.github/actions/e2e_generate_app
3337
with:
3438
PROJECT_KEY: "retail-react-app-bug-bounty"
3539

3640
- name: Create MRT credentials file
41+
if: steps.check.outputs.changed == 'false'
3742
uses: "./.github/actions/create_mrt"
3843
with:
3944
mobify_user: ${{ secrets.MOBIFY_STG_CLIENT_USER }}
4045
mobify_api_key: ${{ secrets.MOBIFY_STG_CLIENT_API_KEY }}
4146

4247
- name: Push Bundle to MRT (Bug Bounty)
48+
if: steps.check.outputs.changed == 'false'
4349
uses: "./.github/actions/push_to_mrt"
4450
with:
4551
CWD: "../generated-projects/retail-react-app-bug-bounty"

0 commit comments

Comments
 (0)