From e254d544ecda6edd1dba7de2e55715bcdf0f1263 Mon Sep 17 00:00:00 2001 From: asafmahlev Date: Thu, 11 Apr 2024 10:15:49 +0300 Subject: [PATCH] Secretless build --- .github/workflows/build.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b74cb50..186ea1f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,8 @@ -on: [push] +on: + push: + branches: [ 'master' ] + pull_request: + branches: [ '**' ] name: Rust Build, Test, and Lint @@ -8,16 +12,19 @@ jobs: permissions: checks: write pull-requests: write - environment: sdke2e + id-token: write + contents: read + environment: build env: RUST_BACKTRACE: 1 RUST_LOG: debug - KUSTO_CLUSTER_URL: https://sdkse2etest.eastus.kusto.windows.net - KUSTO_DATABASE: fastbatchinge2e - AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} - AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} steps: + - name: Azure login + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - uses: actions/checkout@v1 - uses: actions-rs/toolchain@v1 with: @@ -47,6 +54,8 @@ jobs: CARGO_INCREMENTAL: '0' RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' + KUSTO_CLUSTER_URL: https://sdkse2etest.eastus.kusto.windows.net + KUSTO_DATABASE: fastbatchinge2e - uses: actions-rs/grcov@v0.1 id: coverage - name: Publish Unit Test Results