Skip to content

Commit

Permalink
Updating file '.github/workflows/validate.yml' with otterdog.
Browse files Browse the repository at this point in the history
  • Loading branch information
adoptium-bot committed Dec 15, 2023
1 parent 6f7aabe commit 7ddc0f9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ jobs:
working-directory: otterdog-configs

- name: Validate Otterdog Configuration and diff HEAD <-> BASE
id: validate
run: |
# use script to enable ansi color output
script -q /dev/null --command "../otterdog/otterdog.sh local-plan ${{ github.repository_owner }} -c otterdog.json --suffix=-BASE" | tee "$GITHUB_WORKSPACE/diff-ansi.txt"
script -e -q /dev/null --command "../otterdog/otterdog.sh local-plan ${{ github.repository_owner }} -c otterdog.json --suffix=-BASE" | tee "$GITHUB_WORKSPACE/diff-ansi.txt"
echo "VALIDATION_STATUS=${PIPESTATUS[0]}" >> $GITHUB_OUTPUT
# filter out ansi escape sequences again, use sed as ansi2txt is not available
cat "$GITHUB_WORKSPACE/diff-ansi.txt" | sed -e 's/\x1b\[[0-9;]*m//g' | sed -E 's/^([[:space:]]+)([-+!])/\2\1/g' | sed -E 's/^([[:space:]]+)([~])/!\1/g' > "$GITHUB_WORKSPACE/diff.txt"
working-directory: otterdog-configs
Expand Down Expand Up @@ -104,3 +106,7 @@ jobs:
hide_and_recreate: true
hide_classify: "OUTDATED"
path: ${{ github.workspace }}/comment.txt

- name: Propagate validation exit status
run: |
exit ${{ steps.validate.outputs.VALIDATION_STATUS }}

0 comments on commit 7ddc0f9

Please sign in to comment.