Skip to content
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

ci: cleanup workflows #9274

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import {Location} from '@angular/common';
import {type OnChanges, type OnInit, signal} from '@angular/core';
import {Directive, EventEmitter, inject, Input, Output, TemplateRef} from '@angular/core';
import type {OnChanges, OnInit} from '@angular/core';
import {
Directive,
EventEmitter,
inject,
Input,
Output,
signal,
TemplateRef,
} from '@angular/core';
import type {Params} from '@angular/router';
import {ActivatedRoute, UrlSerializer} from '@angular/router';
import {TUI_DOC_URL_STATE_HANDLER} from '@taiga-ui/addon-doc/tokens';
Expand Down
Loading