Skip to content

run this on PR

run this on PR #22

Workflow file for this run

# The name of our workflow
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
inputs:
riskThreshold:
description: "Risk Threshold"
required: false
default: CRITICAL
env:
RISK_THRESHOLD: CRITICAL
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set risk threshold for push
if: github.event_name != 'workflow_dispatch'
run: |
echo "RISK_THRESHOLD=${{ env.RISK_THRESHOLD }}" >> $GITHUB_ENV
- name: Set risk threshold for workflow_dispatch
if: github.event_name == 'workflow_dispatch'
run: |
echo "RISK_THRESHOLD=${{ github.event.inputs.riskThreshold }}" >> $GITHUB_ENV
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build the app
run: ./gradlew bundle
- uses: actions/upload-artifact@v2
with:
name: mfva.aab
path: app/build/outputs/bundle/debug/app.aab
- name: Appknox GitHub action
uses: appknox/appknox-github-action@1.0.0
with:
appknox_access_token: ${{ secrets.APPKNOX_ACCESS_TOKEN }}
file_path: app/build/outputs/bundle/debug/app.aab
risk_threshold: ${{ env.RISK_THRESHOLD }}