Skip to content

Sa 3606 update commands json ci #3

Sa 3606 update commands json ci

Sa 3606 update commands json ci #3

name: Commands Gallery CI
on:
pull_request:
# Sequence of patterns matched against refs/heads
branches:
- "master"
paths:
- "PowerShell/JumpCloud Commands Gallery/**"
- "PowerShell/JumpCloud Commands Gallery/commands.json"
types: [opened, synchronize, reopened, labeled, unlabeled]
jobs:
Filter-Branch:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'Commands Gallery')
steps:
- run: echo "Building JumpCloud Commands Gallery Event"
# Check-PR-Labels:
# needs: ["Filter-Branch"]
# runs-on: ubuntu-latest
# outputs:
# RELEASE_TYPE: ${{ steps.validate.outputs.RELEASE_TYPE }}
# steps:
# - name: Validate-PR-Version-Labels
# id: validate
# shell: pwsh
# run: |
# $PR_LABEL_LIST=$(curl -s "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" | jq -r '.[].name')
# if ("Commands Gallery" -in $PR_LABEL_LIST) {
# write-host "Starting Build for Commands Gallery"
# }
# else {
# write-host "No Commands Gallery label found, skipping build"
# exit 1
# }
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Test-Commands-Gallery:
needs: ["Check-PR-Labels", "Filter-Branch"]

Check failure on line 39 in .github/workflows/commands-gallery-ci.yml

View workflow run for this annotation

GitHub Actions / Commands Gallery CI

Invalid workflow file

The workflow is not valid. .github/workflows/commands-gallery-ci.yml (Line: 39, Col: 21): Job 'Test-Commands-Gallery' depends on unknown job 'Check-PR-Labels'.
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: python -m pip install ./scripts
pip install -r .github/scripts/requirements.txt
- name: Run Python Test
run: pytest .github/scripts/tests/test_build_commands_gallery.py