Skip to content

Commit

Permalink
ci: cleanup workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Sep 30, 2024
1 parent aa71788 commit 353976a
Show file tree
Hide file tree
Showing 16 changed files with 109 additions and 104 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/assign-author.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 🤖 PR author as an assignee
on:
pull_request:

jobs:
assign:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.0
- uses: taiga-family/ci/actions/setup/variables@v1.87.0
- uses: toshimaru/auto-author-assign@v2.1.1
if: env.IS_OWNER_MODE == 'true'
with:
repo-token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
55 changes: 55 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: 🤖 PR auto merge
on:
pull_request:

env:
PR_JOBS_NAME: '[ "Build packages", "Firebase", "Lint", "Unit tests", "Component testing result", "E2E result" ]'
RELEASE_JOBS_NAME: '[ "Publish" ]'

jobs:
setup:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.value }}
steps:
- uses: actions/checkout@v4.2.0
- uses: taiga-family/ci/actions/setup/variables@v1.87.0
- id: matrix
if: env.IS_TAIGA_FAMILY_BOT_PR_AUTHOR == 'true'
run: |
if [[ "${{ env.IS_RELEASE_BRANCH }}" == "false" ]]; then
echo "value=$PR_JOBS_NAME" >> $GITHUB_OUTPUT
else
echo "value=$RELEASE_JOBS_NAME" >> $GITHUB_OUTPUT
fi
wait:
needs: [setup]
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
value: ${{ fromJSON(needs.setup.outputs.matrix) }}
steps:
- uses: taiga-family/ci/actions/run/wait-job@v1.87.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
job: ${{ matrix.value }}

approve:
needs: [wait]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.0
- uses: taiga-family/ci/actions/setup/variables@v1.87.0
- uses: taiga-family/ci/actions/auto/approve/double@v1.87.0
with:
token1: ${{ secrets.GITHUB_TOKEN }}
token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }}
- uses: taiga-family/ci/actions/run/merge@v1.87.0
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
4 changes: 4 additions & 0 deletions .github/workflows/auto-update-icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ jobs:
with:
message: icons have changed
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ jobs:
CI_COMMIT_SHA: ${{ env.CI_COMMIT_SHA }}

concurrency:
group: build-${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,5 @@ jobs:
run: git push origin tag v${{ steps.run-release.outputs.new_version }} || echo ""

concurrency:
group: create-release-${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ jobs:
cname: taiga-ui.dev

concurrency:
group: deploy-gh-pages
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
expires: 1d

concurrency:
group: firebase-${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .github/workflows/e2e-cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ jobs:
- run: npx nx component-test demo-cypress

concurrency:
group: e2e-cypress-${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .github/workflows/e2e-playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,5 @@ jobs:
exit 1
concurrency:
group: e2e-playwright-${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ jobs:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

concurrency:
group: lint-${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
93 changes: 0 additions & 93 deletions .github/workflows/pr.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/publish-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ jobs:
- run: npx ts-node ./scripts/publish-canary.ts

concurrency:
group: publish-canary-${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ jobs:
textLink: '@taiga-ui/cdk'

concurrency:
group: release-${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
21 changes: 21 additions & 0 deletions .github/workflows/ready-to-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 🤖 PR is ready to merge
on:
pull_request_review:
types: [submitted]

jobs:
label-when-approved:
name: Label when approved
runs-on: ubuntu-latest
if: github.event.review.state == 'approved'
steps:
- uses: actions/checkout@v4.2.0
- uses: taiga-family/ci/actions/setup/variables@v1.87.0
- uses: taiga-family/ci/actions/auto/label-when-approved@v1.87.0
with:
approvals: 1
token: ${{ secrets.GITHUB_TOKEN }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .github/workflows/snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

concurrency:
group: snapshots-${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ jobs:
name: units

concurrency:
group: test-${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

0 comments on commit 353976a

Please sign in to comment.