From ffe3a70d3c7a13926416331e0ccb37ab03e54266 Mon Sep 17 00:00:00 2001 From: kennylam <909118+kennylam@users.noreply.github.com> Date: Wed, 14 Feb 2024 10:34:27 -0500 Subject: [PATCH] chore(gh): update GH workflows (#11534) ### Description Clean up Github workflows. ### Changelog **Removed** - remove stale branches from workflow - remove unused workflow files --- .../workflows/automerge-content-updates.yml | 29 -------- .github/workflows/automerge-cwc-releases.yml | 28 -------- .../automerge-storybook-controls.yml | 29 -------- .github/workflows/ci-check.yml | 4 +- .github/workflows/codeql-analysis.yml | 4 +- .github/workflows/deploy-cwc-next.yml | 69 ------------------- .github/workflows/e2e-tests-parallel.yml | 4 +- .github/workflows/e2e-tests.yml | 4 +- .github/workflows/percy-update-base.yml | 2 +- 9 files changed, 9 insertions(+), 164 deletions(-) delete mode 100644 .github/workflows/automerge-content-updates.yml delete mode 100644 .github/workflows/automerge-cwc-releases.yml delete mode 100644 .github/workflows/automerge-storybook-controls.yml delete mode 100644 .github/workflows/deploy-cwc-next.yml diff --git a/.github/workflows/automerge-content-updates.yml b/.github/workflows/automerge-content-updates.yml deleted file mode 100644 index 9da64fe4c46..00000000000 --- a/.github/workflows/automerge-content-updates.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: automerge-content-updates -on: - push: - branches: - - 'main' - -concurrency: - group: automerge-content-updates-${{ github.ref }} - cancel-in-progress: true - -jobs: - automerge-content-updates: - if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom' - runs-on: ubuntu-20.04 - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - steps: - - uses: actions/checkout@v4 - - name: Merge to fix/content-updates - uses: devmasx/merge-branch@1.4.0 - with: - type: now - target_branch: 'fix/content-updates' - env: - GITHUB_TOKEN: ${{secrets.MERGE_ACTION}} - - uses: act10ns/slack@v2 - with: - status: ${{ job.status }} - if: failure() diff --git a/.github/workflows/automerge-cwc-releases.yml b/.github/workflows/automerge-cwc-releases.yml deleted file mode 100644 index 79cf7779c83..00000000000 --- a/.github/workflows/automerge-cwc-releases.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: automerge-cwc -on: - push: - branches: [ release-cwc/* ] - -concurrency: - group: automerge-cwc-${{ github.ref }} - cancel-in-progress: true - -jobs: - automerge-cwc: - if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom' - runs-on: ubuntu-20.04 - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - steps: - - uses: actions/checkout@v4 - - name: Merge to main - uses: devmasx/merge-branch@1.4.0 - with: - type: now - target_branch: 'main' - env: - GITHUB_TOKEN: ${{secrets.MERGE_ACTION}} - - uses: act10ns/slack@v2 - with: - status: ${{ job.status }} - if: failure() diff --git a/.github/workflows/automerge-storybook-controls.yml b/.github/workflows/automerge-storybook-controls.yml deleted file mode 100644 index 1c899cb9474..00000000000 --- a/.github/workflows/automerge-storybook-controls.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: automerge-storybook-controls -on: - push: - branches: - - 'main' - -concurrency: - group: automerge-storybook-controls-${{ github.ref }} - cancel-in-progress: true - -jobs: - automerge-storybook-controls: - if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom' - runs-on: ubuntu-20.04 - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - steps: - - uses: actions/checkout@v4 - - name: Merge to feat/storybook-controls - uses: devmasx/merge-branch@1.4.0 - with: - type: now - target_branch: 'feat/storybook-controls' - env: - GITHUB_TOKEN: ${{secrets.MERGE_ACTION}} - - uses: act10ns/slack@v2 - with: - status: ${{ job.status }} - if: failure() diff --git a/.github/workflows/ci-check.yml b/.github/workflows/ci-check.yml index 17a05743e5e..29a46b1ffda 100644 --- a/.github/workflows/ci-check.yml +++ b/.github/workflows/ci-check.yml @@ -2,9 +2,9 @@ name: ci-check on: push: - branches: [ main, release/*, release-cwc/*, feat/*, fix/content-updates ] + branches: [ main, release/*, feat/* ] pull_request: - branches: [ main, release/*, release-cwc/*, feat/*, fix/content-updates ] + branches: [ main, release/*, feat/* ] concurrency: group: ci-check-${{ github.ref }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3751f60de56..75eb80586f7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,10 +13,10 @@ name: "CodeQL" on: push: - branches: [ main, release/*, feat/*, fix/content-updates ] + branches: [ main, release/*, feat/* ] pull_request: # The branches below must be a subset of the branches above - branches: [ main, release/*, feat/*, fix/content-updates ] + branches: [ main, release/*, feat/* ] schedule: - cron: '35 16 * * 1' diff --git a/.github/workflows/deploy-cwc-next.yml b/.github/workflows/deploy-cwc-next.yml deleted file mode 100644 index 20aff9f1ecd..00000000000 --- a/.github/workflows/deploy-cwc-next.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: deploy-cwc-next (Deploy storybook environments to Github Pages) - -on: - push: - branches: - - release-cwc/* - -concurrency: - group: deploy-cwc-next-${{ github.ref }} - cancel-in-progress: true - -jobs: - carbon-web-components: - if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom' - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - with: - token: ${{secrets.MERGE_ACTION}} - - name: Use Node.js 18.x - uses: actions/setup-node@v4 - with: - node-version: '18.x' - cache: 'yarn' - - name: Install dependencies - run: yarn install --immutable --immutable-cache - - name: Build project - run: yarn lerna run --scope @carbon/web-components build - - - name: Set env vars - uses: ./.github/actions/set-dotenv - with: - env-file: packages/carbon-web-components/.env - env: - KALTURA_PARTNER_ID: ${{ secrets.KALTURA_PARTNER_ID }} - KALTURA_UICONF_ID: ${{ secrets.KALTURA_UICONF_ID }} - PROFILE_HOST: ${{ secrets.PROFILE_HOST }} - - name: Building @carbon/web-components (next) storybook - run: yarn build-storybook - working-directory: packages/carbon-web-components - - name: Move storybook to build folder - run: | - rm packages/carbon-web-components/.env - mkdir -p builds - mv packages/carbon-web-components/storybook-static builds/carbon-web-components - - - name: Deploying @carbon/web-components (next) storybook to Github Pages - run: | - git config --global user.email ${{ secrets.BOT_EMAIL }} - git config --global user.name ${{ secrets.BOT_NAME }} - - git fetch origin gh-pages - git checkout -b gh-pages origin/gh-pages - git update-ref -d refs/remotes/origin/gh-pages - git pull origin gh-pages - - rm -rf next/carbon-web-components - mkdir -p next - mv builds/carbon-web-components next/carbon-web-components - - git add next/carbon-web-components - git commit -m "chore(deploy): deploy Carbon web components next to GitHub Pages" - git push origin gh-pages - - uses: act10ns/slack@v2 - if: failure() - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - with: - status: ${{ job.status }} \ No newline at end of file diff --git a/.github/workflows/e2e-tests-parallel.yml b/.github/workflows/e2e-tests-parallel.yml index dbc211814cb..3e606caefa3 100644 --- a/.github/workflows/e2e-tests-parallel.yml +++ b/.github/workflows/e2e-tests-parallel.yml @@ -2,9 +2,9 @@ name: e2e-tests-parallel on: push: - branches: [ main, release/v2*, feat/*, fix/content-updates ] + branches: [ main, release/v2*, feat/* ] pull_request: - branches: [ main, release/v2*, feat/*, fix/content-updates ] + branches: [ main, release/v2*, feat/* ] concurrency: group: e2e-tests-parallel${{ github.ref }} diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index fc016995569..411ee90555c 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -2,9 +2,9 @@ name: e2e-tests on: push: - branches: [ main, release/v2*, feat/*, fix/content-updates ] + branches: [ main, release/v2*, feat/* ] pull_request: - branches: [ main, release/v2*, feat/*, fix/content-updates ] + branches: [ main, release/v2*, feat/* ] concurrency: group: e2e-tests-${{ github.ref }} diff --git a/.github/workflows/percy-update-base.yml b/.github/workflows/percy-update-base.yml index f942cc8f29c..735bea4e130 100644 --- a/.github/workflows/percy-update-base.yml +++ b/.github/workflows/percy-update-base.yml @@ -2,7 +2,7 @@ name: percy-update-base on: push: - branches: [ main, release/v2*, feat/*, fix/content-updates ] + branches: [ main, release/v2*, feat/* ] concurrency: group: percy-update-base-${{ github.ref }}