-
Notifications
You must be signed in to change notification settings - Fork 3
chore: fix-slackbot #427
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
Merged
Merged
chore: fix-slackbot #427
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
10acea9
chore: fix-slackbot
ryanbas21 3df0536
chore: refactor
ryanbas21 a42deac
chore: refactor
ryanbas21 273f4d9
fix(github-actions): address review comments for publish workflows
ryanbas21 9bc0091
fix(ci): correct pnpm config setup and codecov token
ryanbas21 aa97a72
feat: add fork-safe CI workflow
ryanbas21 e6e8fd2
chore: update-fork-flow
ryanbas21 48d92db
chore: update-ci.yml
ryanbas21 45be026
chore: tasks-and-publish
ryanbas21 049e5b2
chore: pr-review
ryanbas21 0460874
chore: fix-fork-ci
ryanbas21 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: 'Publish Beta Steps' | ||
| description: 'Steps to run when packages are not published (beta branch)' | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: Create PR for beta publish | ||
| shell: bash | ||
| run: pnpm pkg-pr-new publish './packages/*' './packages/sdk-effects/*' --packageManager=pnpm --comment=off | ||
|
|
||
| - name: Run Builds | ||
| shell: bash | ||
| run: pnpm nx run-many -t build --no-agents | ||
|
|
||
| - name: Generate API Docs | ||
| shell: bash | ||
| run: pnpm generate-docs | ||
|
|
||
| - name: Publish api docs [beta] | ||
| uses: JamesIves/github-pages-deploy-action@v4.7.3 | ||
| with: | ||
| folder: docs | ||
| commit-message: 'chore: release-api-docs-beta' | ||
| target-folder: 'beta' | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: 'Publish Release Steps' | ||
| description: 'Steps to run when packages are published' | ||
| inputs: | ||
| publishedPackages: | ||
| description: 'Published packages JSON' | ||
| required: true | ||
| slackWebhook: | ||
| description: 'Slack webhook URL' | ||
| required: true | ||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: Format publishedPackages for Slack | ||
| id: slackify | ||
| shell: bash | ||
| run: | | ||
| raw='${{ inputs.publishedPackages }}' | ||
| message=$(echo "$raw" | jq -r '.[] | "- \(.name) v\(.version)"') | ||
| echo "message<<EOF" >> $GITHUB_OUTPUT | ||
| echo "$message" >> $GITHUB_OUTPUT | ||
| echo "EOF" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Send to Slack Workflow | ||
| uses: slackapi/slack-github-action@v2.0.0 | ||
| with: | ||
| webhook: ${{ inputs.slackWebhook }} | ||
| webhook-type: webhook-trigger | ||
| payload: > | ||
| { | ||
| "publishedPackages": "${{ steps.slackify.outputs.message }}" | ||
| } | ||
ryanbas21 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
ancheetah marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Run Builds | ||
| shell: bash | ||
| run: pnpm nx run-many -t build --no-agents | ||
|
|
||
| - name: Generate API Docs | ||
| shell: bash | ||
| run: pnpm generate-docs | ||
|
|
||
| - name: Publish api docs | ||
| uses: JamesIves/github-pages-deploy-action@v4.7.3 | ||
| with: | ||
| folder: docs | ||
| commit-message: 'chore: release-api-docs' | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| name: 'Setup Project' | ||
| description: 'Centralized setup for CI jobs' | ||
| inputs: | ||
| node-version-file: | ||
| description: 'Node version file' | ||
| required: false | ||
| default: '.node-version' | ||
| pnpm-cache-folder: | ||
| description: 'pnpm cache folder' | ||
| required: false | ||
| default: '.pnpm-store' | ||
| CODECOV_TOKEN: | ||
| description: 'CODECOV_TOKEN' | ||
| required: true | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| run_install: false | ||
|
|
||
| - name: Setup pnpm config | ||
| run: pnpm config set store-dir ${{ inputs.pnpm-cache-folder }} --global | ||
| shell: bash | ||
|
|
||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: ${{ inputs.node-version-file }} | ||
| cache: 'pnpm' | ||
| registry-url: 'https://registry.npmjs.org' | ||
|
|
||
| - name: Update npm | ||
| run: npm install -g npm@latest | ||
| shell: bash | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| shell: bash | ||
|
|
||
| - name: Nx Cloud start | ||
| run: pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN" | ||
| shell: bash | ||
| env: | ||
| CODECOV_TOKEN: ${{ inputs.CODECOV_TOKEN }} | ||
|
|
||
| - name: Cache Playwright browsers | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/ms-playwright | ||
| key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-playwright- | ||
|
|
||
| - name: Install Playwright | ||
| run: pnpm exec playwright install | ||
| shell: bash | ||
|
|
||
| - name: Set Nx SHAs | ||
| uses: nrwl/nx-set-shas@v4 | ||
|
|
||
| - name: Check TS References are Synced | ||
| shell: bash | ||
| run: pnpm nx sync:check | ||
|
|
||
| - name: Run Nx build/lint/test/e2e | ||
| run: pnpm exec nx affected -t build lint test e2e-ci | ||
| shell: bash | ||
|
|
||
| - name: Upload Playwright report | ||
| uses: actions/upload-artifact@v4 | ||
| if: ${{ !cancelled() }} | ||
| with: | ||
| name: playwright-report | ||
| path: | | ||
| ./e2e/*/.playwright/** | ||
| ./e2e/**/.playwright/** | ||
| retention-days: 30 |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| name: ForgeRock Fork Pull Request CI | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| actions: read | ||
|
|
||
| concurrency: | ||
| group: pr-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| pr: | ||
| # Only run for forks | ||
| if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| run_install: false | ||
|
|
||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: '.node-version' | ||
| cache: 'pnpm' | ||
| cache-dependency-path: '**/pnpm-lock.yaml' | ||
|
|
||
| - run: pnpm install --frozen-lockfile | ||
|
|
||
| # Restore-only cache to avoid save attempts/noise on forks | ||
| - name: Restore Playwright browsers cache | ||
| uses: actions/cache/restore@v4 | ||
| with: | ||
| path: ~/.cache/ms-playwright | ||
| key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-playwright- | ||
|
|
||
| - run: pnpm exec playwright install --with-deps | ||
|
|
||
| - name: Track base repository main | ||
| run: | | ||
| git fetch origin +refs/heads/main:refs/remotes/upstream/main | ||
| git branch --force main upstream/main | ||
|
Comment on lines
+50
to
+53
Collaborator
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. Approving this PR but I think you could have also solved this with the https://github.com/nrwl/nx-set-shas/blob/main/README.md#configuration-options |
||
|
|
||
| - uses: nrwl/nx-set-shas@v4 | ||
|
|
||
| - run: pnpm nx format:check | ||
| - run: pnpm nx affected -t build typecheck lint test e2e-ci --no-agents | ||
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.