-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73a22da
commit 4dfe65f
Showing
1 changed file
with
175 additions
and
169 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,14 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
log-event: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Log GitHub event | ||
run: echo ${{ toJson(github.event) }} | ||
|
||
build: | ||
if: ${{ always() && github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
@@ -63,176 +69,176 @@ jobs: | |
name: github-pages | ||
path: docs/public | ||
|
||
deploy-preview: | ||
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
needs: build | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
outputs: | ||
deployment_url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
with: | ||
preview: true | ||
# deploy-preview: | ||
# if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
# needs: build | ||
# permissions: | ||
# pages: write | ||
# id-token: write | ||
# environment: | ||
# name: github-pages | ||
# url: ${{ steps.deployment.outputs.page_url }} | ||
# outputs: | ||
# deployment_url: ${{ steps.deployment.outputs.page_url }} | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Deploy to GitHub Pages | ||
# id: deployment | ||
# uses: actions/deploy-pages@v4 | ||
# with: | ||
# preview: true | ||
|
||
deploy-storybook: | ||
name: Preview Storybook | ||
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
needs: deploy-preview | ||
permissions: | ||
deployments: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: chrnorm/[email protected] | ||
name: Create GitHub deployment for storybook | ||
id: storybook | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
environment: storybook-preview-${{ github.event.workflow_run.event.number }} | ||
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}storybook' | ||
- name: Update storybook deployment status (success) | ||
if: success() | ||
uses: chrnorm/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}storybook' | ||
state: 'success' | ||
deployment-id: ${{ steps.storybook.outputs.deployment_id }} | ||
- name: Update storybook deployment status (failure) | ||
if: failure() | ||
uses: chrnorm/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
state: 'failure' | ||
deployment-id: ${{ steps.storybook.outputs.deployment_id }} | ||
# deploy-storybook: | ||
# name: Preview Storybook | ||
# if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
# needs: deploy-preview | ||
# permissions: | ||
# deployments: write | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: chrnorm/[email protected] | ||
# name: Create GitHub deployment for storybook | ||
# id: storybook | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# environment: storybook-preview-${{ github.event.workflow_run.event.number }} | ||
# environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}storybook' | ||
# - name: Update storybook deployment status (success) | ||
# if: success() | ||
# uses: chrnorm/[email protected] | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}storybook' | ||
# state: 'success' | ||
# deployment-id: ${{ steps.storybook.outputs.deployment_id }} | ||
# - name: Update storybook deployment status (failure) | ||
# if: failure() | ||
# uses: chrnorm/[email protected] | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# state: 'failure' | ||
# deployment-id: ${{ steps.storybook.outputs.deployment_id }} | ||
|
||
deploy-vrt-no-flag: | ||
name: VRT (No flags enabled) | ||
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
needs: [deploy-preview] | ||
permissions: | ||
deployments: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: chrnorm/[email protected] | ||
name: Create GitHub deployment for vrt-no-flag | ||
id: vrt-no-flag | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
environment: vrt-no-flag-${{ github.event.workflow_run.head_branch }} | ||
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' | ||
- name: Update vrt-no-flag deployment status (success) | ||
if: success() | ||
uses: chrnorm/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' | ||
state: 'success' | ||
deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} | ||
- name: Update vrt-no-flag deployment status (failure) | ||
if: failure() | ||
uses: chrnorm/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
state: 'failure' | ||
deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} | ||
# deploy-vrt-no-flag: | ||
# name: VRT (No flags enabled) | ||
# if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
# needs: [deploy-preview] | ||
# permissions: | ||
# deployments: write | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: chrnorm/[email protected] | ||
# name: Create GitHub deployment for vrt-no-flag | ||
# id: vrt-no-flag | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# environment: vrt-no-flag-${{ github.event.workflow_run.head_branch }} | ||
# environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' | ||
# - name: Update vrt-no-flag deployment status (success) | ||
# if: success() | ||
# uses: chrnorm/[email protected] | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' | ||
# state: 'success' | ||
# deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} | ||
# - name: Update vrt-no-flag deployment status (failure) | ||
# if: failure() | ||
# uses: chrnorm/[email protected] | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# state: 'failure' | ||
# deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} | ||
|
||
deploy-vrt-all-flags: | ||
name: VRT (All flags enabled) | ||
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
needs: deploy-preview | ||
permissions: | ||
deployments: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: chrnorm/[email protected] | ||
name: Create GitHub deployment for vrt-all-flags | ||
id: vrt-all-flags | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
environment: vrt-all-flags-${{ github.event.workflow_run.event.number }} | ||
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' | ||
- name: Update vrt-all-flags deployment status (success) | ||
if: success() | ||
uses: chrnorm/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' | ||
state: 'success' | ||
deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} | ||
- name: Update vrt-all-flags deployment status (failure) | ||
if: failure() | ||
uses: chrnorm/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
state: 'failure' | ||
deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} | ||
# deploy-vrt-all-flags: | ||
# name: VRT (All flags enabled) | ||
# if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
# needs: deploy-preview | ||
# permissions: | ||
# deployments: write | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: chrnorm/[email protected] | ||
# name: Create GitHub deployment for vrt-all-flags | ||
# id: vrt-all-flags | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# environment: vrt-all-flags-${{ github.event.workflow_run.event.number }} | ||
# environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' | ||
# - name: Update vrt-all-flags deployment status (success) | ||
# if: success() | ||
# uses: chrnorm/[email protected] | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' | ||
# state: 'success' | ||
# deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} | ||
# - name: Update vrt-all-flags deployment status (failure) | ||
# if: failure() | ||
# uses: chrnorm/[email protected] | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# state: 'failure' | ||
# deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} | ||
|
||
deploy-aat-no-flag: | ||
name: AAT (No flags enabled) | ||
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
needs: deploy-preview | ||
permissions: | ||
deployments: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: chrnorm/[email protected] | ||
name: Create GitHub deployment for aat-no-flag | ||
id: aat-no-flag | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
environment: aat-no-flag-${{ github.event.workflow_run.event.number }} | ||
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' | ||
- name: Update aat-no-flag deployment status (success) | ||
if: success() | ||
uses: chrnorm/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' | ||
state: 'success' | ||
deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} | ||
- name: Update aat-no-flag deployment status (failure) | ||
if: failure() | ||
uses: chrnorm/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
state: 'failure' | ||
deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} | ||
# deploy-aat-no-flag: | ||
# name: AAT (No flags enabled) | ||
# if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
# needs: deploy-preview | ||
# permissions: | ||
# deployments: write | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: chrnorm/[email protected] | ||
# name: Create GitHub deployment for aat-no-flag | ||
# id: aat-no-flag | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# environment: aat-no-flag-${{ github.event.workflow_run.event.number }} | ||
# environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' | ||
# - name: Update aat-no-flag deployment status (success) | ||
# if: success() | ||
# uses: chrnorm/[email protected] | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' | ||
# state: 'success' | ||
# deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} | ||
# - name: Update aat-no-flag deployment status (failure) | ||
# if: failure() | ||
# uses: chrnorm/[email protected] | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# state: 'failure' | ||
# deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} | ||
|
||
deploy-aat-all-flags: | ||
name: AAT (All flags enabled) | ||
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
needs: deploy-preview | ||
permissions: | ||
deployments: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: chrnorm/[email protected] | ||
name: Create GitHub deployment for aat-all-flags | ||
id: aat-all-flags | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
environment: aat-all-flags-${{ github.event.workflow_run.event.number }} | ||
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' | ||
- name: Update aat-all-flags deployment status (success) | ||
if: success() | ||
uses: chrnorm/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' | ||
state: 'success' | ||
deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} | ||
- name: Update aat-all-flags deployment status (failure) | ||
if: failure() | ||
uses: chrnorm/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
state: 'failure' | ||
deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} | ||
# deploy-aat-all-flags: | ||
# name: AAT (All flags enabled) | ||
# if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_repository.full_name == 'primer/react' }} | ||
# needs: deploy-preview | ||
# permissions: | ||
# deployments: write | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: chrnorm/[email protected] | ||
# name: Create GitHub deployment for aat-all-flags | ||
# id: aat-all-flags | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# environment: aat-all-flags-${{ github.event.workflow_run.event.number }} | ||
# environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' | ||
# - name: Update aat-all-flags deployment status (success) | ||
# if: success() | ||
# uses: chrnorm/[email protected] | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' | ||
# state: 'success' | ||
# deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} | ||
# - name: Update aat-all-flags deployment status (failure) | ||
# if: failure() | ||
# uses: chrnorm/[email protected] | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# state: 'failure' | ||
# deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} |