diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c56fa6c..f28219d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,9 +1,11 @@ name: CI - -on: [push] - +on: + pull_request: + branches: + - develop + - main jobs: - build: + check-application: runs-on: ubuntu-latest steps: @@ -19,3 +21,22 @@ jobs: - name: Run tests run: npm test + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: false + tags: sfourm/continuous-integration:latest diff --git a/sonar-project.properties b/sonar-project.properties index 8196944..b0590b6 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,8 +1,8 @@ -sonar.projectKey=pedrofurtado_fullcycle-3.0-integracao-continua-desafios-pipeline-ci-com-sonarcloud -sonar.organization=pedro-furtado +sonar.projectKey=sfourm_continuous-integration +sonar.organization=sfourm # This is the name and version displayed in the SonarCloud UI. -#sonar.projectName=fullcycle-3.0-integracao-continua-desafios-pipeline-ci-com-sonarcloud +#sonar.projectName=continuous-integration #sonar.projectVersion=1.0 @@ -10,4 +10,4 @@ sonar.organization=pedro-furtado #sonar.sources=. # Encoding of the source code. Default is default system encoding -#sonar.sourceEncoding=UTF-8 +#sonar.sourceEncoding=UTF-8 \ No newline at end of file