build.yml 906 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
on:
  push:
    branches:
      - "*"
  pull_request:
    types: [opened, synchronize, reopened]
name: Main Workflow
jobs:
  scan-and-build:
    runs-on: ubuntu-latest
    steps:
      - name: Code Checkout
        uses: actions/checkout@v2
        with:
          # Disabling shallow clone is recommended for improving relevancy of reporting
          fetch-depth: 0
      - name: SonarCloud Scan
        uses: sonarsource/sonarcloud-github-action@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
      - name: Build container image and push to Docker Hub
        uses: docker/build-push-action@v1
24
25
        env:
          DOCKER_BUILDKIT: 1
26
27
28
29
30
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}
          repository: nicolaspernoud/vestibule
          tag_with_ref: true