Skip to content

Commit

Permalink
ci: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Oct 1, 2024
1 parent 746bbc6 commit 2a180b2
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 81 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/assign-author.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 🤖 PR author as an assignee
on:
pull_request:
types: [opened]

jobs:
assign:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: toshimaru/[email protected]
continue-on-error: true

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

env:
JOBS_NAME: '[ "ci" ]'

jobs:
setup:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.value }}
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- id: matrix
run: echo "value=$JOBS_NAME" >> $GITHUB_OUTPUT

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/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
job: ${{ matrix.value }}

approve:
needs: [wait]
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/auto/approve/[email protected]
if: env.IS_TAIGA_FAMILY_BOT_PR_AUTHOR == 'true'
with:
token1: ${{ secrets.GITHUB_TOKEN }}
token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }}
- uses: taiga-family/ci/actions/run/[email protected]
if: env.IS_TAIGA_FAMILY_BOT_PR_AUTHOR == 'true'
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
with:
persist-credentials: false
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npm run typecheck
- run: npx nx run-many -t build --exclude demo
- run: npx nx run-many -t test
Expand All @@ -27,10 +29,10 @@ jobs:
npm run prettier -- --check
npm run lint
fi
- uses: taiga-family/ci/actions/auto/push@v1.87.8
- uses: taiga-family/ci/actions/auto/push@v1.89.0
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

concurrency:
group: lint-${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
6 changes: 3 additions & 3 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/variables@v1.87.8
- uses: taiga-family/ci/actions/setup/node@v1.87.8
- uses: taiga-family/ci/actions/setup/variables@v1.89.0
- uses: taiga-family/ci/actions/setup/node@v1.89.0
- run: npx nx build demo

- uses: FirebaseExtended/action-hosting-deploy@v0
Expand All @@ -20,5 +20,5 @@ jobs:
expires: 1d

concurrency:
group: deploy-preview-${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/node@v1.87.8
- uses: taiga-family/ci/actions/setup/node@v1.89.0
- run: npx nx build-gh-pages demo
- name: Deploy
uses: JamesIves/[email protected]
Expand All @@ -21,5 +21,5 @@ jobs:
clean: true

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

This file was deleted.

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/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/auto/[email protected]
with:
approvals: 1
token: ${{ secrets.GITHUB_TOKEN }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ jobs:
if: "!contains(github.event.head_commit.message, 'chore(release)')"
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/run/release-it@v1.87.8
- uses: taiga-family/ci/actions/run/release-it@v1.89.0
with:
ref: ${{ github.ref }}
mode: ${{ github.event.inputs.mode }}
npmToken: ${{ secrets.NPM_TOKEN }}
githubToken: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

- uses: taiga-family/ci/actions/run/read-package-json@v1.87.8
- uses: taiga-family/ci/actions/run/read-package-json@v1.89.0
id: info

- name: Announce to Telegram
uses: taiga-family/ci/actions/messenger/telegram/announce@v1.87.8
uses: taiga-family/ci/actions/messenger/telegram/announce@v1.89.0
with:
chatId: ${{ secrets.TAIGA_TELEGRAM_CHAT_ID }}
topicId: ${{ secrets.TAIGA_TELEGRAM_CHAT_THREAD_ID }}
Expand All @@ -39,5 +39,5 @@ jobs:
textLink: ${{ steps.info.outputs.name }}

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

0 comments on commit 2a180b2

Please sign in to comment.