Skip to content

Commit

Permalink
ci: analytics-browser-gtm script check (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhao900914 authored May 17, 2024
1 parent 62dabd9 commit 79db3fa
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/gtmScript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: analytics-browser-gtm Script Check

on:
push:
branches:
- v3.x
pull_request:
types: [opened, synchronize]
branches:
- v3.x

jobs:
script-scan:
runs-on: ubuntu-latest

steps:
- name: Check out git repository
uses: actions/checkout@v3

- name: Scan for analytics-browser-gtm script
run: |
if grep -Po 'https://cdn\.amplitude\.com/libs/analytics-browser-gtm-\d+\.\d+\.\d+-min\.js\.gz' src/amplitude-wrapper.js; then
echo "Amplitude analytics-browser-gtm found in file"
else
echo "No specific Amplitude URL found in file"
exit 1 # Missing Amplitude analytics-browser-gtm script
exit 1
fi

0 comments on commit 79db3fa

Please sign in to comment.