From 0f91723f7ce7d1deeb92c6cdd095882dd8a539e6 Mon Sep 17 00:00:00 2001 From: mivanov4tcs Date: Sat, 7 Oct 2023 21:51:28 +0300 Subject: [PATCH] ci: use custom actions --- .github/workflows/auto-approve.yml | 16 +++++------ .github/workflows/auto-author-assign.yml | 2 +- .github/workflows/auto-cleanup-caches.yml | 2 +- .github/workflows/auto-dependency-review.yml | 2 +- .github/workflows/auto-label.yml | 2 +- .github/workflows/auto-remove-label.yml | 2 +- .github/workflows/auto-update-icons.yml | 13 +++------ .github/workflows/build.yml | 2 +- .github/workflows/bundle-size-tracking.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/create-release.yml | 2 +- .github/workflows/deploy-gh-pages.yml | 2 +- .github/workflows/deploy-preview.yml | 2 +- .github/workflows/e2e.yml | 8 +++--- .github/workflows/lint.yml | 29 ++++++++++++-------- .github/workflows/publish-canary.yml | 2 +- .github/workflows/publish.yml | 2 +- .github/workflows/snapshots.yml | 4 +-- .github/workflows/test.yml | 4 +-- .github/workflows/validate-tag.yml | 2 +- 20 files changed, 51 insertions(+), 51 deletions(-) diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index 4b91d1593025c..0da62ad6bfe1b 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -11,10 +11,10 @@ jobs: outputs: matrix: ${{ steps.matrix.outputs.value }} steps: - - uses: actions/checkout@v4.1.0 - - uses: taiga-family/ci/actions/setup/variables@v1.29.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 + - uses: taiga-family/ci/actions/setup/variables@v1.29.19 - id: matrix - if: env.TAIGA_FAMILY_BOT_IS_AUTHOR == 'true' + if: env.IS_TAIGA_FAMILY_BOT_PR_AUTHOR == 'true' run: | if [[ "${{ env.IS_RELEASE_BRANCH }}" == "false" ]]; then echo "value=$PR_JOBS_NAME" >> $GITHUB_OUTPUT @@ -30,7 +30,7 @@ jobs: matrix: value: ${{ fromJSON(needs.setup.outputs.matrix) }} steps: - - uses: taiga-family/ci/actions/run/wait-job@v1.29.0 + - uses: taiga-family/ci/actions/run/wait-job@v1.29.19 with: token: ${{ secrets.GITHUB_TOKEN }} job: ${{ matrix.value }} @@ -39,13 +39,13 @@ jobs: needs: [wait] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 - - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - - uses: taiga-family/ci/actions/auto/approve/double@v1.29.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 + - uses: taiga-family/ci/actions/setup/variables@v1.29.19 + - uses: taiga-family/ci/actions/auto/approve/double@v1.29.19 with: token1: ${{ secrets.GITHUB_TOKEN }} token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }} - - uses: taiga-family/ci/actions/run/merge@v1.29.0 + - uses: taiga-family/ci/actions/run/merge@v1.29.19 if: env.IS_RELEASE_BRANCH == 'false' with: token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml index 321309e28db0f..ba67d32cd902e 100644 --- a/.github/workflows/auto-author-assign.yml +++ b/.github/workflows/auto-author-assign.yml @@ -8,7 +8,7 @@ jobs: name: PR author as an assignee runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - uses: toshimaru/auto-author-assign@v2.0.1 if: env.IS_OWNER_MODE == 'true' diff --git a/.github/workflows/auto-cleanup-caches.yml b/.github/workflows/auto-cleanup-caches.yml index 018f51ca9af63..e797fa0df2234 100644 --- a/.github/workflows/auto-cleanup-caches.yml +++ b/.github/workflows/auto-cleanup-caches.yml @@ -12,7 +12,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/auto/cleanup-cache@v1.29.0 if: github.event_name == 'push' with: diff --git a/.github/workflows/auto-dependency-review.yml b/.github/workflows/auto-dependency-review.yml index 85c89a2ceb8a4..34ae9e77609c2 100644 --- a/.github/workflows/auto-dependency-review.yml +++ b/.github/workflows/auto-dependency-review.yml @@ -8,5 +8,5 @@ jobs: dependency-review: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/security/dependency-review@v1.29.0 diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml index 6011c877c5ccf..960ff0cca4d1c 100644 --- a/.github/workflows/auto-label.yml +++ b/.github/workflows/auto-label.yml @@ -6,7 +6,7 @@ jobs: name: Label when approved runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - uses: taiga-family/ci/actions/auto/label-when-approved@v1.29.0 with: diff --git a/.github/workflows/auto-remove-label.yml b/.github/workflows/auto-remove-label.yml index 30f50177bebdc..95343ff3d3198 100644 --- a/.github/workflows/auto-remove-label.yml +++ b/.github/workflows/auto-remove-label.yml @@ -7,5 +7,5 @@ jobs: remove_label: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/auto/remove-label@v1.29.0 diff --git a/.github/workflows/auto-update-icons.yml b/.github/workflows/auto-update-icons.yml index 3a2f322ed6415..a122babb64a48 100644 --- a/.github/workflows/auto-update-icons.yml +++ b/.github/workflows/auto-update-icons.yml @@ -8,20 +8,15 @@ jobs: if: ${{ !contains(github.head_ref , 'release/') }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 - - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - - uses: actions/checkout@v4.1.0 - if: env.SUPPORT_AUTO_PUSH == 'true' - with: - token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} - - uses: taiga-family/ci/actions/setup/node@v1.29.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.17 + - uses: taiga-family/ci/actions/setup/variables@v1.29.17 + - uses: taiga-family/ci/actions/setup/node@v1.29.17 - run: | npx nx prebuild icons npx nx build icons npx ts-node ./scripts/generate-used-icons.ts npx eslint ./projects/cdk/constants/used-icons.ts --fix npx prettier ./projects/cdk/constants/used-icons.ts --write - - uses: taiga-family/ci/actions/auto/push@v1.29.0 - if: env.SUPPORT_AUTO_PUSH == 'true' + - uses: taiga-family/ci/actions/auto/push@v1.29.17 with: message: icons have changed diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f3dab900f8fe..713406f0f3759 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: name: Build packages runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - uses: taiga-family/ci/actions/setup/node@v1.29.0 - run: npm run run-many:build:libs diff --git a/.github/workflows/bundle-size-tracking.yml b/.github/workflows/bundle-size-tracking.yml index d57177cbf1332..c3797c220aa18 100644 --- a/.github/workflows/bundle-size-tracking.yml +++ b/.github/workflows/bundle-size-tracking.yml @@ -10,7 +10,7 @@ jobs: if: ${{ !contains(github.head_ref, 'release/') }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - uses: taiga-family/ci/actions/setup/node@v1.29.0 - run: npx nx build demo diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 308ad81998340..eb2ba1bb9fde3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -17,7 +17,7 @@ jobs: contents: read security-events: write steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/security/codeql@v1.29.0 concurrency: diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 2d1e1ed6d2a1c..09476dfe11c66 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -25,7 +25,7 @@ jobs: IS_DRY_MODE: ${{ github.event.inputs.dryRun == 'true' }} IS_RRE_RELEASE_MODE: ${{ contains(github.event.inputs.mode, 'prerelease') }} steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 with: token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} - uses: taiga-family/ci/actions/setup/node@v1.29.0 diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index a0a85c31258dd..cf86294e0aee8 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -16,7 +16,7 @@ jobs: if: ${{ !contains(github.event.workflow_run.head_branch, 'release/') }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - name: Prepare demo before deploy from snapshots diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 8750549d8188c..a115f7924a84f 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -7,7 +7,7 @@ jobs: name: Firebase runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - uses: taiga-family/ci/actions/setup/node@v1.29.0 - run: npx nx build demo --base-href='/' diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 01b8629790ac5..5aec2eefc0cff 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -13,7 +13,7 @@ jobs: name: Build demo runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 with: fetch-depth: 10 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 @@ -41,7 +41,7 @@ jobs: [addon-doc, addon-charts, addon-commerce, addon-mobile, addon-table, addon-tablebars, icons, core, deep, kit] name: ${{ matrix.project }} steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - uses: taiga-family/ci/actions/setup/node@v1.29.0 @@ -101,7 +101,7 @@ jobs: shard: [1, 2, 3] name: playwright / (${{ matrix.shard }} of 3) steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - uses: taiga-family/ci/actions/setup/node@v1.29.0 @@ -171,7 +171,7 @@ jobs: needs: [cypress, playwright] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - name: Download artifacts / ${{ env.CYPRESS_SNAPSHOTS_ARTIFACTS_KEY }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d7df0863c8613..f5921e2100746 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,21 +10,26 @@ jobs: if: ${{ !contains(github.head_ref, 'release/') }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 - - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - - uses: actions/checkout@v4.1.0 - if: env.SUPPORT_AUTO_PUSH == 'true' - with: - token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} - - uses: taiga-family/ci/actions/setup/node@v1.29.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 + - uses: taiga-family/ci/actions/setup/variables@v1.29.19 + - uses: taiga-family/ci/actions/setup/node@v1.29.19 - run: npm run typecheck - run: npm run cspell -- --no-progress - - run: npm run prettier ${{ env.SUPPORT_AUTO_PUSH == 'true' && '-- --write' || '-- --check' }} - - run: npm run stylelint ${{ env.SUPPORT_AUTO_PUSH == 'true' && '-- --fix' || '' }} - - run: npm run lint ${{ env.SUPPORT_AUTO_PUSH == 'true' && '-- --fix' || '' }} + - run: | + if [[ "${{ env.SUPPORT_AUTO_PUSH }}" == "true" ]]; then + npm run prettier -- --write + npm run stylelint -- --fix + npm run lint -- --fix + else + npm run prettier -- --check + npm run stylelint + npm run lint + fi + - name: Apply changes after linting - if: env.SUPPORT_AUTO_PUSH == 'true' - uses: taiga-family/ci/actions/auto/push@v1.29.0 + uses: taiga-family/ci/actions/auto/push@v1.29.19 + with: + token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} concurrency: group: lint-${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/publish-canary.yml b/.github/workflows/publish-canary.yml index 22338bcaf2b7c..eab6364df771f 100644 --- a/.github/workflows/publish-canary.yml +++ b/.github/workflows/publish-canary.yml @@ -10,7 +10,7 @@ jobs: name: Packages runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - uses: taiga-family/ci/actions/setup/node@v1.29.0 - uses: taiga-family/ci/actions/setup/config/npm@v1.29.0 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4f54c77fc525a..786e766680eee 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,7 +8,7 @@ jobs: name: Publish runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - uses: taiga-family/ci/actions/setup/node@v1.29.0 - uses: taiga-family/ci/actions/setup/config/npm@v1.29.0 diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index 25ce62465ca17..6e5a152ada869 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -10,7 +10,7 @@ jobs: name: next runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - uses: taiga-family/ci/actions/setup/node@v1.29.0 @@ -29,7 +29,7 @@ jobs: name: production runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/variables@v1.29.0 - uses: taiga-family/ci/actions/setup/node@v1.29.0 id: nodejs-workspace diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8290593be87b9..311bd5a983c50 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,7 +28,7 @@ jobs: ] name: ${{ matrix.project }} steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: taiga-family/ci/actions/setup/node@v1.29.0 - name: Run tests for ${{ matrix.project }} @@ -45,7 +45,7 @@ jobs: needs: [test] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 - uses: actions/download-artifact@v3.0.2 with: name: coverage-${{ github.workflow }}-${{ github.run_id }} diff --git a/.github/workflows/validate-tag.yml b/.github/workflows/validate-tag.yml index e9648710144a4..bf177c186484f 100644 --- a/.github/workflows/validate-tag.yml +++ b/.github/workflows/validate-tag.yml @@ -8,7 +8,7 @@ jobs: name: Validate tag runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 + - uses: taiga-family/ci/actions/setup/checkout@v1.29.19 with: fetch-depth: 0