Skip to content

Commit

Permalink
Merge branch '3006.x' into pick_nichol_cmd_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cmcmarrow authored Apr 26, 2023
2 parents 62e438a + b420772 commit f0df597
Show file tree
Hide file tree
Showing 497 changed files with 4,571 additions and 2,018 deletions.
23 changes: 23 additions & 0 deletions .github/actions/get-pull-labels/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: get-pull-labels
description: Get Pull Labels
inputs:
pull-request:
type: string

outputs:
labels:
value: ${{ steps.get-pull-labels.outputs.labels }}

runs:
using: composite
steps:
- name: Get Pull Labels
id: get-pull-labels
shell: bash
env:
PULL_REQUEST: ${{ inputs.pull-request }}
run: |
labels=$(jq -c '[.labels[].name]' <<< $PULL_REQUEST)
echo $labels
echo "labels=$labels" >> "$GITHUB_OUTPUT"
46 changes: 46 additions & 0 deletions .github/actions/get-pull-number/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

---
name: get-pull-number
description: Get Pull Number
inputs:
owner:
type: string
repo:
type: string
sha:
type: string
pull-number:
default: null

outputs:
number:
value: ${{ steps.get-pull-number.outputs.number }}

runs:
using: composite
steps:
- name: Get Pull Number
id: get-pull-number
shell: bash
env:
GITHUB_OWNER: ${{ inputs.owner }}
GITHUB_REPO: ${{ inputs.repo }}
GITHUB_SHA: ${{ inputs.sha }}
GITHUB_PULL_NUMBER: ${{ inputs.pull-number }}
run: |
if [ -z "$GITHUB_PULL_NUMBER" ]
then
echo "Searching For Pull Number"
echo $GITHUB_OWNER
echo $GITHUB_REPO
echo $GITHUB_SHA
pulls=$(gh api repos/$GITHUB_OWNER/$GITHUB_REPO/commits/$GITHUB_SHA/pulls)
echo $pulls
full_name=$GITHUB_OWNER/$GITHUB_REPO
number=$(jq -c --arg r "$full_name" '[.[] | select(.url | contains($r))][0].number' <<< $pulls )
else
echo "Given Pull Number"
number=$GITHUB_PULL_NUMBER
fi
echo $number
echo "number=$number" >> "$GITHUB_OUTPUT"
30 changes: 30 additions & 0 deletions .github/actions/get-pull-request/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

---
name: get-pull-request
description: Get Pull Request
inputs:
owner:
type: string
repo:
type: string
pull-number:
type: number

outputs:
pull-request:
value: ${{ steps.get-pull-request.outputs.request }}

runs:
using: composite
steps:
- name: Get Pull Request
id: get-pull-request
shell: bash
env:
GITHUB_OWNER: ${{ inputs.owner }}
GITHUB_REPO: ${{ inputs.repo }}
GITHUB_PULL_NUMBER: ${{ inputs.pull-number }}
run: |
pull=$(gh api repos/$GITHUB_OWNER/$GITHUB_REPO/pulls/$GITHUB_PULL_NUMBER)
echo $pull
echo "request=$pull" >> "$GITHUB_OUTPUT"
57 changes: 56 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
COLUMNS: 190
CACHE_SEED: SEED-2 # Bump the number to invalidate all caches
CACHE_SEED: SEED-3 # Bump the number to invalidate all caches
RELENV_DATA: "${{ github.workspace }}/.relenv"

permissions:
Expand All @@ -33,6 +33,7 @@ jobs:
jobs: ${{ steps.define-jobs.outputs.jobs }}
runners: ${{ steps.runner-types.outputs.runners }}
changed-files: ${{ steps.process-changed-files.outputs.changed-files }}
pull-labels: ${{ steps.get-pull-labels.outputs.labels }}
testrun: ${{ steps.define-testrun.outputs.testrun }}
salt-version: ${{ steps.setup-salt-version.outputs.salt-version }}
cache-seed: ${{ steps.set-cache-seed.outputs.cache-seed }}
Expand Down Expand Up @@ -136,6 +137,36 @@ jobs:
salt-version: ""
validate-version: true

- name: Get Pull Number
if: ${{ github.event_name == 'pull_request' }}
id: get-pull-number
uses: ./.github/actions/get-pull-number
with:
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
sha: ${{ github.sha }}
pull-number: ${{ github.event.pull_request.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get Pull Request
if: ${{ github.event_name == 'pull_request' }}
id: get-pull-request
uses: ./.github/actions/get-pull-request
with:
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
pull-number: ${{ steps.get-pull-number.outputs.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get Pull Labels
if: ${{ github.event_name == 'pull_request' }}
id: get-pull-labels
uses: ./.github/actions/get-pull-labels
with:
pull-request: ${{ steps.get-pull-request.outputs.pull-request }}

- name: Write Changed Files To A Local File
run:
echo '${{ toJSON(steps.changed-files.outputs) }}' > changed-files.json
Expand Down Expand Up @@ -821,6 +852,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -839,6 +871,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -857,6 +890,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -875,6 +909,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -893,6 +928,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -911,6 +947,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -929,6 +966,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -947,6 +985,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -965,6 +1004,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -983,6 +1023,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1001,6 +1042,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1019,6 +1061,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1037,6 +1080,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1055,6 +1099,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1073,6 +1118,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1091,6 +1137,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1109,6 +1156,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1127,6 +1175,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1145,6 +1194,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1163,6 +1213,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1181,6 +1232,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1199,6 +1251,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1217,6 +1270,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand All @@ -1235,6 +1289,7 @@ jobs:
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.11
pull-labels: ${{ needs.prepare-workflow.outputs.pull-labels }}
skip-code-coverage: ${{ github.event_name == 'pull_request' }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

Expand Down
Loading

0 comments on commit f0df597

Please sign in to comment.