Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
radical committed Aug 17, 2023
1 parent 2a2ebb7 commit d28eba7
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/bump-chrome-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Update Chrome Version used for wasm testing

permissions:
contents: write
pull-requests: write

on:
schedule:
- cron: '30 19 * * *'

workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Branch
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git checkout -b update-chrome-version-${{ github.run_id }}
- name: Run UpdateToLatestVersion
run: >-
make -C src/mono/wasm build-tasks &&
.dotnet/dotnet build src/mono/wasm/bump_chrome_version.proj -p:Configuration=Release &&
git add eng/testing/ChromeVersions.props
- name: Check for changes
id: check_changes
run: |
echo "has_changes=$(git diff-index --quiet HEAD && echo false || echo true)" >> $GITHUB_OUTPUT
- name: Commit Update
run: |
echo steps.check_changes.outputs.has_changes=${{steps.check_changes.outputs.has_changes}}
if ${{steps.check_changes.outputs.has_changes}} == 'true'; then
git commit -m "Automated bump of chrome version"
git push --set-upstream origin update-chrome-version-${{ github.run_id }}
else
echo "No changes detected."
fi
- name: Create PR
if: steps.check_changes.outputs.has_changes == 'true'
uses: actions/github-script@v6
with:
script: |
const { data: pullRequest } = await github.rest.pulls.create({
base: context.ref,
head: "update-chrome-version-${{ github.run_id }}",
owner: context.repo.owner,
repo: context.repo.repo,
title: '[wasm] Bump chrome version used for testing',
body: ''
});
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pullRequest.number,
reviewers: ["lewing", "radical"]
});
return pullRequest.number;

0 comments on commit d28eba7

Please sign in to comment.