Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Commit

Permalink
chore: multiline env var; explicitly check diff against HEAD~1 (#167)
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Boldt <nboldt@redhat.com>
  • Loading branch information
nickboldt committed Jan 29, 2024
1 parent 4845ed6 commit fb48a1f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/next-container-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,18 @@ jobs:
- name: check-changes
# check changes in this commit for regex include and exclude matches; pipe to an env var
run: |
CHANGES="$(git diff --name-only | \
CHANGES="$(git diff --name-only HEAD~1 | \
grep -E "docker/|\.dockerignore|workflows/.+-container-build.yaml|Makefile|bundle/|config/|go.mod|go.sum|.+\.go" | \
grep -v -E ".+_test.go|/.rhdh/")";
echo "Changed files for this commit:"
echo "=============================="
echo "$CHANGES"
echo "=============================="
echo "CHANGES=$CHANGES" >> $GITHUB_ENV
{
echo 'CHANGES<<EOF'
echo $CHANGES
echo EOF
} >> "$GITHUB_ENV"
next-build:
name: Next build
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/pr-container-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,18 @@ jobs:
- name: check-changes
# check changes in this commit for regex include and exclude matches; pipe to an env var
run: |
CHANGES="$(git diff --name-only | \
CHANGES="$(git diff --name-only HEAD~1 | \
grep -E "docker/|\.dockerignore|workflows/.+-container-build.yaml|Makefile|bundle/|config/|go.mod|go.sum|.+\.go" | \
grep -v -E ".+_test.go|/.rhdh/")";
echo "Changed files for this commit:"
echo "=============================="
echo "$CHANGES"
echo "=============================="
echo "CHANGES=$CHANGES" >> $GITHUB_ENV
{
echo 'CHANGES<<EOF'
echo $CHANGES
echo EOF
} >> "$GITHUB_ENV"
pr-build:
name: PR Publish
Expand Down

0 comments on commit fb48a1f

Please sign in to comment.