-
Notifications
You must be signed in to change notification settings - Fork 2.9k
ci(.github): add reusable build action #24910
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,35 @@ | ||||||
| name: 'Build workspaces' | ||||||
| description: 'Runs the build command for specific workspaces.' | ||||||
| inputs: | ||||||
| # Because Github Actions doesn't support arrays as inputs we need to pass the workspaces as a string and split them | ||||||
| # by spaces https://github.com/community/community/discussions/11692 | ||||||
| workspaces: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. based on my previous comment, this should be rather singular
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because of the previous discussion (about this input being an array), I think we should keep it plural, ie |
||||||
| required: true | ||||||
| description: 'The workspaces you want to build. This parameter accepts multiple workspaces separated by a space.' | ||||||
| # This is based on the backfill cache provider options: https://github.com/microsoft/backfill#set-up-remote-cache | ||||||
| backfill-cache-provider: | ||||||
| required: false | ||||||
| description: 'The backfill cache provider' | ||||||
| default: 'azure-blob' | ||||||
| # Depending on the chosen cache provider there are multiple types of available options. In our case we use Azure Blob | ||||||
| # Storage. https://github.com/microsoft/backfill#microsoft-azure-blob-storage | ||||||
| backfill-cache-provider-options: | ||||||
| required: false | ||||||
| description: 'The backfill cache provider options' | ||||||
| # Flag to toggle backfill remote caching on / off | ||||||
| lage-write-remote-cache: | ||||||
| required: true | ||||||
| description: 'Whether to write to the remote cache' | ||||||
| default: 'true' | ||||||
|
|
||||||
| runs: | ||||||
| using: 'composite' | ||||||
| steps: | ||||||
| - name: build package dependency tree (scripts:build) | ||||||
| working-directory: . | ||||||
| shell: bash | ||||||
| run: yarn build --to ${{ inputs.workspaces }} | ||||||
| env: | ||||||
| BACKFILL_CACHE_PROVIDER: ${{ inputs.backfill-cache-provider }} | ||||||
| BACKFILL_CACHE_PROVIDER_OPTIONS: ${{ inputs.backfill-cache-provider-options }} | ||||||
| LAGE_WRITE_REMOTE_CACHE: ${{ inputs.lage-write-remote-cache }} | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,7 +44,10 @@ jobs: | |
| run: yarn install --frozen-lockfile | ||
|
|
||
| - name: Build dependencies | ||
| run: yarn build --to @fluentui/public-docsite-v9 | ||
| uses: ./.github/actions/build-to | ||
| with: | ||
| workspaces: '@fluentui/public-docsite-v9' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: can this be an array (based on the naming), if not can we rename this to
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I looked up the option of having inputs as arrays but apparently it's not possible. I thought of naming it
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how would that look like ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Space separated,
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah lets avoid that. last thing - can you please add documentation to that input so one can find how to define multiple workspaces ? ty
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a comment to give more details about why we chose this approach and improved the field's description. |
||
| backfill-cache-provider-options: ${{ secrets.BACKFILL_CACHE_PROVIDER_OPTIONS }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you please update our build docs for the docsite release so that this is all in there ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The documentation has been updated for the Chromatic deployment and a new one for the Github Pages deployment was created. |
||
|
|
||
| - name: Publish to Chromatic | ||
| run: yarn workspace @fluentui/public-docsite-v9 chromatic | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.