Skip to content

Sa 3607 gha ci workflow km #62

Sa 3607 gha ci workflow km

Sa 3607 gha ci workflow km #62

name: PowerShell Module CI
on:
pull_request:
branches:
- 'JumpCloudModule_**'
jobs:
check-changes:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check Changes in Folder
run: |
# Define the path to the specific folder you want to check
SPECIFIC_FOLDER="Powershell/JumpCloud Module"
# Check for changes in the specific folder
git diff --name-only origin/$GITHUB_BASE_REF origin/$GITHUB_HEAD_REF
# CHANGED_FILES=$(git diff --name-only origin/$GITHUB_BASE_REF origin/$GITHUB_HEAD_REF | grep "^$SPECIFIC_FOLDER")
# if [ -n "$CHANGED_FILES" ]; then
# echo "Changes detected in the specified folder: $CHANGED_FILES"
# else
# echo "No changes detected in the specified folder. Exiting..."
# exit 0 # Exit the workflow with a success status code
# fi
clone:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
Publish-PowerShell-Artifact:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
Source: "CodeArtifact"
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
PowerShell
- shell: pwsh
run: |
. "./PowerShell/Deploy/BuildNuspecFromPsd1.ps1" -RequiredModulesRepo PSGallery