Skip to content

test edit pr

test edit pr #12

name: PowerShell Module CI
on:
push:
paths:
# JumpCloud Module
- 'PowerShell/JumpCloud Module/**'
# Pull Request
pull_request:
paths:
# JumpCloud Module
- 'PowerShell/JumpCloud Module/**'
types: [opened, edited]
jobs:
Test-Diff-Master-Branch:
runs-on: ubuntu-latest
steps:
- name : testPR
uses: actions/checkout@v4
- name: Get diff if pull request
if: github.event_name == 'pull_request'
run: |
# Get the current branch
current_branch=$(git symbolic-ref --short HEAD)
# Fetch changes from the master branch
git fetch origin master:master
# Run the git diff command between master and the current branch
git diff master..$current_branch
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