forked from Azure/Azure-Sentinel
-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 1.69 KB
/
checkSkipPackagingInfo.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# IF createPackage ATTRIBUTE IN DATA INPUT FILE IS SPECIFIED AS FALSE THEN SKIP PACKAGE CREATION ELSE DEFAULT IS CREATE PACKAGE
name: Check if packaging need to be Skipped
on:
workflow_call:
inputs:
solutionName:
required: true
type: string
outputs:
isPackagingRequired:
description: "Solution name for the current pr"
value: ${{ jobs.checkPackagingInfoStatus.outputs.isPackagingRequired }}
env:
BRANCH_NAME: ${{ github.event.client_payload.pull_request.head.ref || github.event.client_payload.pullRequestBranchName }}
jobs:
checkPackagingInfoStatus:
name: Check If Packaging Need to skip
runs-on: ubuntu-latest
outputs:
isPackagingRequired: ${{ steps.getPackagingSkipStatus.outputs.isPackagingRequired }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
fetch-depth: 2
ref: "${{ env.BRANCH_NAME }}"
- name: Check Skip Packaging Status
shell: pwsh
id: getPackagingSkipStatus
run: |
$instrumentationKey = "${{ vars.APPINSIGHTS }}"
$runId = "${{ github.run_id }}"
$solutionName = "${{ inputs.solutionName }}"
$baseFolderPath = "/home/runner/work/Azure-Sentinel/Azure-Sentinel/"
$pullRequestNumber = "${{ github.event.client_payload.pull_request.number && github.event.client_payload.pull_request.number || github.event.client_payload.pullRequestNumber }}"
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module powershell-yaml
./.script/package-automation/checkSkipPackagingInfo.ps1 $solutionName $pullRequestNumber $runId $baseFolderPath $instrumentationKey