generated from Tinkoff/angular-open-source-starter
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: 🤖 Auto approve validation | |
on: pull_request | ||
|
||
env: | ||
JOBS_NAME: '["build", "build-demo", "lint", "tests"]' | ||
JOBS_NAME: '[ "build", "build-demo", "lint", "tests" ]' | ||
|
||
jobs: | ||
setup: | ||
|
@@ -17,13 +17,11 @@ jobs: | |
needs: [setup] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
value: ${{ fromJSON(needs.setup.outputs.matrix) }} | ||
steps: | ||
- run: | | ||
echo "${{ matrix.value }}" | ||
- name: Wait for "${{ matrix.value }}" job to succeed | ||
uses: fountainhead/[email protected] | ||
- uses: fountainhead/[email protected] | ||
id: waiter | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -36,74 +34,35 @@ jobs: | |
if: steps.waiter.outputs.conclusion == 'success' | ||
run: echo 'success' | ||
|
||
- name: Do something with a failing build | ||
- uses: actions/github-script@v5 | ||
if: steps.waiter.outputs.conclusion == 'failure' | ||
run: echo 'failure' | ||
continue-on-error: true | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: '⛔ ${{ matrix.value }} job has failed!' | ||
}) | ||
- if: steps.waiter.outputs.conclusion == 'failure' | ||
run: exit 1 | ||
|
||
result: | ||
needs: [wait] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
echo "approve" | ||
automated-pull-request: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- uses: taiga-family/ci/actions/setup/[email protected] | ||
- uses: taiga-family/ci/actions/setup/[email protected] | ||
- name: Wait for build to succeed | ||
uses: fountainhead/[email protected] | ||
id: wait1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
checkName: build | ||
ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
timeoutSeconds: 3600 | ||
intervalSeconds: 60 | ||
- name: Wait for build to succeed | ||
if: steps.wait1.outputs.conclusion == 'success' | ||
uses: fountainhead/[email protected] | ||
id: wait2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
checkName: build-demo | ||
ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
timeoutSeconds: 3600 | ||
intervalSeconds: 60 | ||
- name: Wait for build to succeed | ||
if: steps.wait2.outputs.conclusion == 'success' | ||
uses: fountainhead/[email protected] | ||
id: wait3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
checkName: lint | ||
ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
timeoutSeconds: 3600 | ||
intervalSeconds: 60 | ||
- name: Wait for build to succeed | ||
if: steps.wait3.outputs.conclusion == 'success' | ||
uses: fountainhead/[email protected] | ||
id: wait-for-build | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
checkName: tests | ||
ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
timeoutSeconds: 3600 | ||
intervalSeconds: 60 | ||
|
||
- name: Do something with a passing build | ||
if: steps.wait-for-build.outputs.conclusion == 'success' | ||
run: echo 'success' | ||
|
||
- name: Do something with a failing build | ||
if: steps.wait-for-build.outputs.conclusion == 'failure' | ||
run: echo 'failure' | ||
|
||
- run: echo 'cool' | ||
- uses: taiga-family/ci/actions/auto/approve/[email protected] | ||
if: env.TAIGA_FAMILY_BOT_IS_AUTHOR == 'true' | ||
with: | ||
token1: ${{ secrets.GITHUB_TOKEN }} | ||
token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }} | ||
|
||
concurrency: | ||
group: auto-approve-${{ github.head_ref }} | ||
cancel-in-progress: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ jobs: | |
- 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 typecheck2 | ||
- run: npm run prettier -- --check | ||
- run: npm run stylelint | ||
- run: npm run lint | ||
|