Skip to content

Commit

Permalink
use chromiumdash.appspot.com
Browse files Browse the repository at this point in the history
  • Loading branch information
uazo committed Dec 13, 2023
1 parent 827cc8c commit 11b3a63
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ on:
description: 'runner?'
required: false
default: 'ubuntu-latest'
# schedule:
# - cron: '0 1 * * *'
schedule:
- cron: '0 1 * * *'

env:
CHR_VERSION: ${{ github.event.inputs.version }}
Expand Down Expand Up @@ -73,7 +73,12 @@ jobs:
shell: bash
run: |
if [ -z $CHR_VERSION ]; then
CHR_VERSION=$(curl -s https://omahaproxy.appspot.com/all.json | jq '.[] | select(.os | contains("win64")) | .versions[] | select(.channel | contains("stable")) | .current_version' | xargs)
LATEST_WIN=$(curl -s 'https://versionhistory.googleapis.com/v1/chrome/platforms/win64/channels/stable/versions/all/releases' | jq -rc '.releases[].version' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -n 1)
LATEST_ANDROID=$(curl -s 'https://versionhistory.googleapis.com/v1/chrome/platforms/android/channels/stable/versions/all/releases' | jq -rc '.releases[].version' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -n 1)
CHR_VERSION=$(echo -e "$LATEST_ANDROID\n$LATEST_WIN" | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -n 1)
echo "LATEST_WIN=$LATEST_WIN" >> $GITHUB_ENV
echo "LATEST_ANDROID=$LATEST_ANDROID" >> $GITHUB_ENV
echo "CHR_VERSION=$CHR_VERSION" >> $GITHUB_ENV
fi
Expand Down Expand Up @@ -124,4 +129,16 @@ jobs:
cd cromite/tools
echo ${{ secrets.GITHUB_TOKEN }} | $GH auth login --with-token
$GH issue create -t "$CHR_VERSION: new chromium version" -b ""
if [[ "$LATEST_WIN" == "$CHR_VERSION" ]]; then
echo Using Windows Release >>body.txt
curl -s 'https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Windows&num=10&offset=0' | \
jq --arg LATEST "$LATEST_WIN" '.[] | select( .version == $LATEST )' >>body.txt
fi
if [[ "$LATEST_ANDROID" == "$CHR_VERSION" ]]; then
echo Using Android Release >>body.txt
curl -s 'https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Android&num=10&offset=0' | \
jq --arg LATEST "$LATEST_ANDROID" '.[] | select( .version == $LATEST )' >>body.txt
fi
$GH issue create -t "$CHR_VERSION: new chromium version" -F body.txt

0 comments on commit 11b3a63

Please sign in to comment.