From e6b5ae56fecccb5585bea82dc77acf104ff497e8 Mon Sep 17 00:00:00 2001 From: Ash Beitz <8304894+ashbeitz@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:00:31 -0800 Subject: [PATCH] Minor workflow fixes --- .github/workflows/generate-plantuml.yml | 27 +++++++++++++++++-------- tools/notice_generation.sh | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/generate-plantuml.yml b/.github/workflows/generate-plantuml.yml index e5c2ec6a..9e558f1b 100644 --- a/.github/workflows/generate-plantuml.yml +++ b/.github/workflows/generate-plantuml.yml @@ -1,6 +1,12 @@ name: generate plantuml -on: push +on: + push: + branches-ignore: + - 'main' + - 'release/**' + paths: + - '**.puml' jobs: generate_plantuml: @@ -9,11 +15,16 @@ jobs: steps: - name: checkout uses: actions/checkout@v3 - - name: plantuml - id: plantuml - uses: grassedge/generate-plantuml-action@v1.5 + - name: generate plantuml + run: | + sudo apt-get install -y plantuml graphviz + # This uses a slightly off-white background color because #ffffff renders as transparent for some reason + plantuml -tsvg -SbackgroundColor=fefefe -checkmetadata -v **/*.puml + shell: bash + - name: commit changes + uses: EndBug/add-and-commit@v9 with: - path: . - message: "Render PlantUML files" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + author_name: Automated Notice Generation Pipeline + author_email: ibeji-bot@eclipse.org + message: Generate PlantUML Diagrams + pathspec_error_handling: exitAtEnd diff --git a/tools/notice_generation.sh b/tools/notice_generation.sh index bbedc4e1..dcda10ad 100755 --- a/tools/notice_generation.sh +++ b/tools/notice_generation.sh @@ -40,7 +40,7 @@ DOTNET_SRC_DIRECTORY="dtdl-tools/" echo "Appending .NET Third Party licenses to $NOTICE_FILENAME" ./tools/dotnet_notice_generation.sh $NOTICE_FILENAME $DOTNET_SRC_DIRECTORY ./devops/cg/license_url_to_type.json -if [ -z "$(git diff --name-only $NOTICE_FILENAME)" ] +if [ -z "$(git diff --name-only $NOTICE_FILENAME)" ] && [ -z "$(git ls-files --others --exclude-standard)"] then echo "File not changed" else