From 8085bb0411865063f18a483fbb3f242822695abe Mon Sep 17 00:00:00 2001 From: Billy Cao Date: Sun, 28 Jan 2024 13:04:46 +0800 Subject: [PATCH] clean_checkout input to handle cleaning after checkout (#14) * Update action.yml * Make clean optional * Update README.md for optional clean checkout feature * Make default for clean_checkout true * Make default for clean_checkout true - README --- README.md | 1 + action.yml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index d896fe3..b0915ee 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ You can also use any major tags like `@v1` for any `@v1.*.*` | `pyinstaller_ver` | - | Specific pyinstaller version you want to use *(with proper signs, like `==5.13.2`)* | `exe_path` | ./dist | Path on runner-os, where executable will be stored | `upload_exe_with_name`| - | Upload exe_ artifact with this name. Else, it won't upload + | `clean_checkout` | true | If true, perform a clean checkout; if false, skip cleaning. Cleaning will remove all existing local files not in the repository during checkout. If you use utilities like pyinstaller-versionfile, set this to false.
diff --git a/action.yml b/action.yml index dc9d7d5..7e0299f 100644 --- a/action.yml +++ b/action.yml @@ -38,6 +38,9 @@ inputs: upload_exe_with_name: description: If passed, uploads executable artifact with this name. Else, artifact won't be uploaded. default: '' + clean_checkout: + description: 'If true, perform a clean checkout; if false, skip cleaning. Cleaning will remove all existing local files not in the repository during checkout. If you use utilities like pyinstaller-versionfile, set this to false.' + default: true outputs: executable_path: @@ -80,6 +83,8 @@ runs: - name: Checkout repository uses: actions/checkout@v3 + with: + clean: ${{ inputs.clean_checkout }} - name: (Install) dependencies if: inputs.requirements != ''