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

#34 Изменение frontend.yml для тестов CI/CD #40

Merged
merged 1 commit into from
Dec 10, 2024
Merged
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
14 changes: 10 additions & 4 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ on:
pull_request:
branches:
- frontend
push:
branches:
- frontend
types:
- opened
- synchronize

workflow_dispatch:

pull_request_target:
types:
- closed

jobs:
build-and-analyze:
if: github.event.pull_request.merged != true
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -69,7 +75,7 @@ jobs:
npx sonar-scanner -Dsonar.projectKey=$SONAR_PROJECT_KEY -Dsonar.projectName='lenka-messenger' -Dsonar.sources=src -Dsonar.pullrequest.key=${{ github.event.number}} -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} -Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} -Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} -Dsonar.host.url=$SONAR_HOST_URL

deploy-to-dockerhub:
if: github.ref == 'refs/heads/frontend'
if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'frontend'
runs-on: ubuntu-latest
needs: build-and-analyze

Expand Down
Loading