Skip to content

Bump github/codeql-action from 4.30.9 to 4.31.2 #157

Bump github/codeql-action from 4.30.9 to 4.31.2

Bump github/codeql-action from 4.30.9 to 4.31.2 #157

Workflow file for this run

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
name: PowerShell Formula PR
permissions: read-all
on:
workflow_dispatch:
push:
paths:
- '.github/workflows/PR-powershell.yml'
- 'Formula/powershell.rb'
branches:
- master
pull_request:
defaults:
run:
shell: pwsh
env:
FORMULA_PATH: ./Formula/powershell.rb
UPDATE_SCRIPT_PATH: ./scripts/Upgrade-Formula.ps1
FORMULA_NAME: powershell
CHANNEL_NAME: stable
HOMEBREW_NO_ENV_HINTS: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
jobs:
changes:
if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell'
name: Change Detection
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
workflows: ${{ steps.filter.outputs.workflows }}
steps:
- name: checkout
uses: actions/checkout@v4.2.2
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.2.0
id: filter
with:
list-files: json
filters: |
workflows:
- '.github/workflows/PR-powershell.yml'
- 'Formula/powershell.rb'
- name: Capture outputs
run: |
"workflows: ${{ steps.filter.outputs.workflows }}"
shell: pwsh
homebrew-formula-stable:
timeout-minutes: 15
needs: changes
if: ${{ needs.changes.outputs.workflows == 'true' }}
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
- name: Check for applicable files
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
filters: |
workflows:
- '.github/workflows/PR-powershell.yml'
- 'Formula/powershell.rb'
- name: Prepare Agent
if: steps.filter.outputs.workflows == 'true'
uses: ./.github/workflows/composite/prep
- name: Uninstall PowerShell
if: steps.filter.outputs.workflows == 'true'
shell: bash
run: |
cd /
PKG_ID='com.microsoft.powershell'
pkgutil --only-files --files ${PKG_ID} | awk '!/\.app/' | tr '\n' '\0' | xargs -n 1 -0 -p sudo rm
sudo pkgutil --forget ${PKG_ID}
- name: Install and Test Formula
if: steps.filter.outputs.workflows == 'true'
uses: ./.github/workflows/composite/installAndTest
ready_to_merge:
name: Stable ready to merge
needs:
- homebrew-formula-stable
- changes
if: always()
uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0
with:
needs_context: ${{ toJson(needs) }}