diff --git a/.github/workflows/ArtifactsUpload.yml b/.github/workflows/ArtifactsUpload.yml index 3445f5c..16532fb 100644 --- a/.github/workflows/ArtifactsUpload.yml +++ b/.github/workflows/ArtifactsUpload.yml @@ -86,7 +86,7 @@ jobs: **/*.py Build-single-file: - name: ${{ matrix.os.icon }} Build 1 on ${{ matrix.os.name }} - Upload artifact + name: ${{ matrix.os.icon }} Build single-file on ${{ matrix.os.name }} - Upload artifact runs-on: ${{ matrix.os.image }} strategy: fail-fast: false @@ -121,7 +121,7 @@ jobs: document1.txt Build-single-file-in-directory: - name: ${{ matrix.os.icon }} Build 1 on ${{ matrix.os.name }} - Upload artifact + name: ${{ matrix.os.icon }} Build single-file-in-directory on ${{ matrix.os.name }} - Upload artifact runs-on: ${{ matrix.os.image }} strategy: fail-fast: false @@ -156,7 +156,7 @@ jobs: bin/program.py Build-double-file-in-directory: - name: ${{ matrix.os.icon }} Build 1 on ${{ matrix.os.name }} - Upload artifact + name: ${{ matrix.os.icon }} Build double-file-in-directory on ${{ matrix.os.name }} - Upload artifact runs-on: ${{ matrix.os.image }} strategy: fail-fast: false @@ -193,7 +193,7 @@ jobs: bin/tool.py Build-triple-file-in-directory: - name: ${{ matrix.os.icon }} Build 1 on ${{ matrix.os.name }} - Upload artifact + name: ${{ matrix.os.icon }} Build triple-file-in-directory on ${{ matrix.os.name }} - Upload artifact runs-on: ${{ matrix.os.image }} strategy: fail-fast: false @@ -232,7 +232,7 @@ jobs: lib/gui/dialog.py Build-double-file-in-deep-directory: - name: ${{ matrix.os.icon }} Build 1 on ${{ matrix.os.name }} - Upload artifact + name: ${{ matrix.os.icon }} Build double-file-in-deep-directory on ${{ matrix.os.name }} - Upload artifact runs-on: ${{ matrix.os.image }} strategy: fail-fast: false @@ -269,7 +269,7 @@ jobs: lib/gui/dialog.py Build-single-directory: - name: ${{ matrix.os.icon }} Build 1 on ${{ matrix.os.name }} - Upload artifact + name: ${{ matrix.os.icon }} Build single-directory on ${{ matrix.os.name }} - Upload artifact runs-on: ${{ matrix.os.image }} strategy: fail-fast: false @@ -304,7 +304,7 @@ jobs: bin Build-double-directory: - name: ${{ matrix.os.icon }} Build 1 on ${{ matrix.os.name }} - Upload artifact + name: ${{ matrix.os.icon }} Build double-directory on ${{ matrix.os.name }} - Upload artifact runs-on: ${{ matrix.os.image }} strategy: fail-fast: false diff --git a/action.yml b/action.yml index 1c5c337..e8475c7 100644 --- a/action.yml +++ b/action.yml @@ -236,6 +236,19 @@ runs: printf " %s\n" "${ANSI_CYAN}Directories: ${dirCount}${ANSI_NOCOLOR}" printf " %s\n" "${ANSI_CYAN}Files: ${fileCount}${ANSI_NOCOLOR}" + if [[ $fileCount -eq 0 ]]; then + if [[ "${{ inputs.if-no-files-found }}" == "error" ]]; then + printf "::error title=%s::%s\n" "${{ github.job }} - pyTooling/upload-artifact" "No files found for given pattern." + exit 1 + elif [[ "${{ inputs.if-no-files-found }}" == "warn" ]]; then + printf "::warning title=%s::%s\n" "${{ github.job }} - pyTooling/upload-artifact" "No files found for given pattern." + elif [[ "${{ inputs.if-no-files-found }}" == "ignore" ]]; then + printf "%s\n" "No files found for given pattern." + else + printf "%s\n" "Unknown option '${{ inputs.if-no-files-found }}'." + fi + fi + - name: Remove dot-files if not explicitly included id: clean if: inputs.include-hidden-files == 'false'