Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sync-examples workflow #12562

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix sync-examples workflow #12562

wants to merge 2 commits into from

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Nov 29, 2024

Changes

  • Added checkout-ref input so we can sync the examples via a specific commit (we can use the commit before we merge next into main)
  • Updated how we detect prereleases to check against .changeset/pre.json instead of the branch name
    • The bug before assumed that anything on main was stable which isn't always the case

There's two ways we can do after this is resolved:

  1. Merge this PR, trigger the workflow manually to sync with the commit before we merged next to main, revert chore: downgrade examples to not use beta releases #12557, and it'll auto sync main to the beta branch instead.
  2. Or disable this workflow, merge this PR, and re-enable the workflow on Tuesday again after we revert chore: downgrade examples to not use beta releases #12557 and prep the release

To prevent more work and to play it safe, I think no2 is the best for now.

Testing

n/a. Reading the code I think it'll work later.

Docs

n/a

Copy link

changeset-bot bot commented Nov 29, 2024

⚠️ No Changeset found

Latest commit: 2e1b602

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the 🚨 action Modifies GitHub Actions label Nov 29, 2024
- name: Sync from main branch to latest and examples/* branches
if: steps.detect.outputs.has-changesets == 'false' && github.ref == 'refs/heads/main'
- name: Sync stable to latest and examples/* branches
if: steps.detect.outputs.has-changesets == 'false' && github.ref == 'refs/heads/main' && steps.pre.outputs.value == ''
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We technically no longer need the github.ref == 'refs/heads/main' part, but I think it's better to leave that in to prevent cases where we create the next branch again but haven't entered prerelease, and we don't want to accidentally sync it to the latest branch examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 action Modifies GitHub Actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant