Create monthly_metric.yml #259
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check puppeteer version | |
on: [pull_request] | |
defaults: | |
run: | |
working-directory: . | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get current version | |
run: | | |
LAST_VERSION="$(curl -s https://github.com/puppeteer/puppeteer/releases | grep -Eo "puppeteer: v[0-9]+(\.[0-9]+)+" | head -n 1 | cut -d 'v' -f 2)" | |
CURRENT_VERSION="$(cat package.json | grep "puppeteer" | grep -Eo "\^[^\"]+" | sed 's|\^||')" | |
echo "$LAST_VERSION" | |
echo "$CURRENT_VERSION" | |
#export VAR_TEST="exported" | |
TARGET_STATUS="fail" | |
if [ "$LAST_VERSION" != "$CURRENT_VERSION" ]; then | |
exit 1 | |
fi | |
#echo "TARGET_STATUS=$TARGET_STATUS" >> $GITHUB_ENV | |
# - uses: emibcn/badge-action@v1.2.1 | |
# with: | |
# label: 'Latest Puppeteer_${VAR_TEST}' | |
# status: "${{ env.TARGET_STATUS }}" | |
# color: 'blue,555,daf' | |
# path: '.github/badges/coverage.svg' | |