From 3d56470118a06276ea573da851d572f32b23bf16 Mon Sep 17 00:00:00 2001 From: Lucas Moreira Date: Sat, 25 Jun 2022 20:58:29 -0300 Subject: [PATCH 1/3] Update github-actions.js.yml --- .github/workflows/github-actions.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.js.yml b/.github/workflows/github-actions.js.yml index 36872f0..0003869 100644 --- a/.github/workflows/github-actions.js.yml +++ b/.github/workflows/github-actions.js.yml @@ -14,7 +14,7 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains multiple jobs - build_test: + Build_app: # The type of runner that the job will run on runs-on: ubuntu-latest environment: Production @@ -42,7 +42,7 @@ jobs: -Dsonar.pullrequest.github.repository=${{ github.repository }} -Dsonar.scm.provider=git - - name: setup node + - name: Setup node uses: actions/setup-node@master with: node-version: ${{ matrix.node-version }} From 9904f0172565ecfe26a29eeac1898a5aa2d66b29 Mon Sep 17 00:00:00 2001 From: Lucas Moreira Date: Sat, 25 Jun 2022 21:14:20 -0300 Subject: [PATCH 2/3] Update github-actions.js.yml --- .github/workflows/github-actions.js.yml | 53 ++++++++++++------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/.github/workflows/github-actions.js.yml b/.github/workflows/github-actions.js.yml index 0003869..eb5fb6a 100644 --- a/.github/workflows/github-actions.js.yml +++ b/.github/workflows/github-actions.js.yml @@ -14,6 +14,19 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains multiple jobs + SonarCloud: + name: Sonarcloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + Build_app: # The type of runner that the job will run on runs-on: ubuntu-latest @@ -26,22 +39,6 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - - - name: SonarCloud Scan - # You may pin to the exact commit or the version. - # uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049 - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - args: > - -Dsonar.pullrequest.key=${{ github.event.number }} - -Dsonar.pullrequest.branch=${{ github.HEAD_REF }} - -Dsonar.pullrequest.base=${{ github.BASE_REF }} - -Dsonar.pullrequest.github.repository=${{ github.repository }} - -Dsonar.scm.provider=git - - name: Setup node uses: actions/setup-node@master with: @@ -58,15 +55,17 @@ jobs: - name: Build the app run: | yarn build - - name: Vercel Action - # You may pin to the exact commit or the version. - # uses: amondnet/vercel-action@168e94457309ea2f8b885de5f181c8d79754b263 - uses: amondnet/vercel-action@v25 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - vercel-token: ${{ secrets.VERCEL_TOKEN }} - vercel-args: '--prod' - vercel-org-id: ${{ secrets.VERCEL_ORGANIZATION_ID }} #Required - vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} #Required - working-directory: ./ #Your Working Directory, Optional + + Vercel_deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: amondnet/vercel-action@v20 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-args: '--prod' + vercel-org-id: ${{ secrets.VERCEL_ORGANIZATION_ID }} #Required + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} #Required + working-directory: ./ #Your Working Directory, Optional From eb6d987c7f97533f40b4671b68e954f95dd93170 Mon Sep 17 00:00:00 2001 From: Lucas Moreira Date: Sat, 25 Jun 2022 21:17:04 -0300 Subject: [PATCH 3/3] Update github-actions.js.yml --- .github/workflows/github-actions.js.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/github-actions.js.yml b/.github/workflows/github-actions.js.yml index eb5fb6a..429761b 100644 --- a/.github/workflows/github-actions.js.yml +++ b/.github/workflows/github-actions.js.yml @@ -17,6 +17,7 @@ jobs: SonarCloud: name: Sonarcloud runs-on: ubuntu-latest + environment: Production steps: - uses: actions/checkout@v2 with: @@ -58,6 +59,7 @@ jobs: Vercel_deploy: runs-on: ubuntu-latest + environment: Production steps: - uses: actions/checkout@v2 - uses: amondnet/vercel-action@v20