Skip to content

Updated pipeline with azure authentication via service principal and … #16

Updated pipeline with azure authentication via service principal and …

Updated pipeline with azure authentication via service principal and … #16

Workflow file for this run

name: Build and Deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
AZURE_FUNCTIONAPP_NAME: 'hvalfangstlinuxfunctionapp'
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache Cargo dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install musl-tools
run: sudo apt install musl-tools
- name: Add musl target
run: rustup target add x86_64-unknown-linux-musl
- name: Build
run: cargo build --release --target=x86_64-unknown-linux-musl
- name: Copy handler file
run: cp target/x86_64-unknown-linux-musl/release/handler .
- name: Upload
uses: actions/upload-artifact@v2
with:
name: handler
path: ./handler
- name: List files
run: ls -lats
- name: Checkout
uses: actions/checkout@v2
- name: Download
uses: actions/download-artifact@v2
with:
name: handler
- name: Login to Azure
run: az login --service-principal -u ${{ secrets.AZURE_SP_APP_ID }} -p ${{ secrets.AZURE_SP_PASSWORD }} --tenant ${{ secrets.AZURE_TENANT_ID }}

Check failure on line 59 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 59
- name: Run Azure Functions Action
uses: Azure/functions-action@v1
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}