chore(canary): Add retries to build system canary package install (#4… #1195
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
# Description: this workflow creates or updates the "Version Packages" PR. | |
# | |
# Triggered by: whenever a commit is merged onto main and there are | |
# new changesets to consume. | |
name: Version Packages | |
on: | |
push: | |
branches: [main] | |
permissions: | |
contents: write # Used to commit to "Version Packages" PR | |
pull-requests: write # Used to create "Version Packages" PR | |
# Other permissions are defaulted to none | |
jobs: | |
version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f | |
with: | |
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | |
fetch-depth: 0 | |
- name: Check if repo has unconsumed changesets | |
id: has-changesets | |
uses: ./.github/actions/has-changesets | |
- name: Setup Node.js 16 | |
if: ${{ steps.has-changesets.outputs.has-changesets == 'true' }} | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 https://github.com/actions/setup-node/commit/64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c | |
with: | |
node-version: 16 | |
cache: 'yarn' | |
env: | |
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 | |
- name: Install packages | |
if: ${{ steps.has-changesets.outputs.has-changesets == 'true' }} | |
run: yarn --frozen-lockfile | |
- name: Create or update Version Packages PR | |
if: ${{ steps.has-changesets.outputs.has-changesets == 'true' }} | |
uses: changesets/action@b98cec97583b917ff1dc6179dd4d230d3e439894 | |
with: | |
version: yarn bumpVersions | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |