name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
job1:
job2:
needs: job1
runs-on: macos-latest
strategy:
matrix:
os: [macos, macos]
node: [6, 8, 10]
steps:
- id: step1
- id: step2
name: Check out Git repository
env:
FIRST_NAME:Mona
uses: actions/checkout@v2
with:
node-version: '12'
run: |
echo "::set-output name=test::hello"
shell: bash
working-directory: ./tmp
outputs:
output1:${{ steps.step1.outputs.test }}
output2:${{ steps.step2.outputs.test }}
build:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download and install the build wrapper
- name: Download and install the SonarScanner
- name: Build and analyse the project
run: |
# Potential improvement : add these paths to the PATH env var.
$HOME/.sonar/build-wrapper-macosx-x86/build-wrapper-macosx-x86 --out-dir bw-output xcodebuild
$HOME/.sonar/sonar-scanner-4.6.2.2472-macosx/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}