Skip to content

Commit

Permalink
Add manual dispactch
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmosgenius committed Oct 13, 2021
1 parent e002a09 commit 24913a2
Showing 1 changed file with 35 additions and 19 deletions.
54 changes: 35 additions & 19 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,42 @@ on:
push:
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 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 build
- uses: actions/upload-artifact@v2
with:
name: mfva.apk
path: app/build/outputs/apk/debug/app-debug.apk
- 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/apk/debug/app-debug.apk
risk_threshold: CRITICAL
- 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 build
- uses: actions/upload-artifact@v2
with:
name: mfva.apk
path: app/build/outputs/apk/debug/app-debug.apk
- 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/apk/debug/app-debug.apk
risk_threshold: ${{ env.RISK_THRESHOLD }}

0 comments on commit 24913a2

Please # to comment.