Files
vercel__next.js/.github/workflows/update_react_poller.yml
Benjamin Woodruff 0a355571a0 [ci] Update all actions/* dependencies (#94174)
Previously we pinned all of these to their current versions at the time.
That meant that some of these got pinned to really old versions. This
updates all of the "first-party" `actions/*` dependencies.

Prompted claude with:

```
For all of these uses of actions/*, make sure we're pulling in the latest stable version (check the gh cli). When upgrading across major versions, fetch the release notes from the GH releases using the gh CLI and make sure that there are no problems that the upgrade will cause.
```

Claude read all the release notes and seems to think these upgrades are
safe.

![Screenshot 2026-05-27 at
3.36.15 PM.png](https://app.graphite.com/user-attachments/assets/4b863905-a983-43a1-ba3d-5d3cc2988bc2.png)
2026-05-28 09:26:57 -07:00

70 lines
2.6 KiB
YAML

name: Poll React Sync
on:
schedule:
# GitHub runs cronjobs at most every 5 minutes.
# Ideally we get 2 minutes or lower which is what we used to have with Vercel cronjobs.
- cron: '*/5 * * * *'
concurrency:
group: poll-react-sync
cancel-in-progress: true
jobs:
poll:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
# We're using react@experimental as a signal for a new React sync because
# in facebook/react we publish experimental after canary. If we would just
# look at canary, we might update before experimental is published.
- name: Fetch latest react@experimental version
id: current
run: |
CURRENT=$(npm --silent view --json react@experimental version | tr -d '"')
if [ -z "$CURRENT" ]; then
echo "Failed to resolve react@experimental version" >&2
exit 1
fi
echo "version=$CURRENT" >> "$GITHUB_OUTPUT"
echo "Current react@experimental: $CURRENT"
- name: Check whether this version was already seen
id: cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
# The key encodes the version. Cache hit = already processed; cache miss = new version.
# The path just needs to exist so the post-step can save the cache entry on a miss.
path: .cache/marker
key: react-experimental-${{ steps.current.outputs.version }}
- name: Mark version as seen
if: steps.cache.outputs.cache-hit != 'true'
run: |
mkdir -p .cache
printf '%s' '${{ steps.current.outputs.version }}' > .cache/marker
- name: Resolve corresponding react@canary version
id: canary
if: steps.cache.outputs.cache-hit != 'true'
run: |
CANARY=$(npm --silent view --json react@canary version | tr -d '"')
if [ -z "$CANARY" ]; then
echo "Failed to resolve react@canary version" >&2
exit 1
fi
echo "version=$CANARY" >> "$GITHUB_OUTPUT"
echo "Current react@canary: $CANARY"
- name: Dispatch update_react.yml
if: steps.cache.outputs.cache-hit != 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
EXPERIMENTAL: ${{ steps.current.outputs.version }}
CANARY: ${{ steps.canary.outputs.version }}
run: |
echo "react@experimental changed to $EXPERIMENTAL. Dispatching update_react.yml with react@canary=$CANARY."
gh workflow run update_react.yml --ref ${{ github.ref_name }} -f version="$CANARY"