Skip to content

Commit

Permalink
ci: use custom actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mivanov4tcs committed Oct 7, 2023
1 parent 839fe33 commit 6157ee4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
matrix: ${{ steps.matrix.outputs.value }}
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected].0
- uses: taiga-family/ci/actions/setup/[email protected].15
- 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
Expand All @@ -30,7 +30,7 @@ jobs:
matrix:
value: ${{ fromJSON(needs.setup.outputs.matrix) }}
steps:
- uses: taiga-family/ci/actions/run/[email protected].0
- uses: taiga-family/ci/actions/run/[email protected].15
with:
token: ${{ secrets.GITHUB_TOKEN }}
job: ${{ matrix.value }}
Expand All @@ -40,12 +40,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected].0
- uses: taiga-family/ci/actions/auto/approve/[email protected].0
- uses: taiga-family/ci/actions/setup/[email protected].15
- uses: taiga-family/ci/actions/auto/approve/[email protected].15
with:
token1: ${{ secrets.GITHUB_TOKEN }}
token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }}
- uses: taiga-family/ci/actions/run/[email protected].0
- uses: taiga-family/ci/actions/run/[email protected].15
if: env.IS_RELEASE_BRANCH == 'false'
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,27 @@ jobs:
if: ${{ !contains(github.head_ref, 'release/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: actions/[email protected]
if: env.SUPPORT_AUTO_PUSH == 'true'
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- 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 -- --fix
npm run lint -- --fix
fi
- name: Apply changes after linting
if: env.SUPPORT_AUTO_PUSH == 'true'
uses: taiga-family/ci/actions/auto/[email protected]
uses: taiga-family/ci/actions/auto/[email protected]
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

concurrency:
group: lint-${{ github.workflow }}-${{ github.ref }}
Expand Down

0 comments on commit 6157ee4

Please sign in to comment.