Add language injection for larger bash scripts in composite actions (#16040)
This commit is contained in:
parent
2f02aa49dd
commit
e1a8a30696
2 changed files with 6 additions and 4 deletions
7
.github/actions/changed-files/action.yml
vendored
7
.github/actions/changed-files/action.yml
vendored
|
@ -18,9 +18,10 @@ runs:
|
|||
- id: changes
|
||||
name: Find changes
|
||||
shell: bash
|
||||
# language=bash
|
||||
run: |
|
||||
BASE_REF=${{ github.base_ref }}
|
||||
|
||||
|
||||
changed () {
|
||||
git diff --name-only origin/${{ github.base_ref }} | grep -E "$1" &>/dev/null && echo true || echo false
|
||||
}
|
||||
|
@ -28,7 +29,7 @@ runs:
|
|||
if [ "$BASE_REF" != "" ]; then
|
||||
echo "Checking changes against orgin/$BASE_REF"
|
||||
git fetch origin
|
||||
|
||||
|
||||
JAVA=`changed '^.*/.*.java$'`
|
||||
THEMES=`changed '^themes/src/main/.*$'`
|
||||
JS_ADAPTER=`changed '^adapters/oidc/js/.*$'`
|
||||
|
@ -43,7 +44,7 @@ runs:
|
|||
echo "Java changed: $JAVA"
|
||||
echo "Themes changed: $THEMES"
|
||||
echo "JS adapter changed: $JS_ADAPTER"
|
||||
|
||||
|
||||
echo "java=$JAVA" >> $GITHUB_OUTPUT
|
||||
echo "themes=$THEMES" >> $GITHUB_OUTPUT
|
||||
echo "js-adapter=$JS_ADAPTER" >> $GITHUB_OUTPUT
|
||||
|
|
|
@ -8,6 +8,7 @@ runs:
|
|||
name: Find flaky tests
|
||||
if: github.repository == 'keycloak/keycloak'
|
||||
shell: bash
|
||||
# language=bash
|
||||
run: |
|
||||
REPO="${{ github.repository }}"
|
||||
ISSUES_LINK="https://github.com/${{ github.repository }}/issues/"
|
||||
|
@ -22,7 +23,7 @@ runs:
|
|||
TITLE="Flaky test: $TEST"
|
||||
BODY="$RUN"$'\n''```'$'\n'"$LOG"$'\n''```'
|
||||
ISSUE="$(gh issue list --search "$TITLE in:title" --json number --jq .[].number)"
|
||||
|
||||
|
||||
if [ "$PR" == "" ]; then
|
||||
if [ "$ISSUE" == "" ]; then
|
||||
LINK="$(gh issue create -t "$TITLE" -b "$BODY" -l "kind/bug,area/ci,flaky-test" | grep $ISSUES_LINK)"
|
||||
|
|
Loading…
Reference in a new issue