From b49f989b0affe2e032b554e3ce3e8afa9dfb346a Mon Sep 17 00:00:00 2001 From: peichins Date: Thu, 21 Mar 2024 14:12:59 +1000 Subject: [PATCH] action to zip user scripts --- .github/workflows/zip_use_scripts.yml | 32 +++++++++++++++++++++++++++ scripts/Readme.md | 8 +++---- 2 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/zip_use_scripts.yml diff --git a/.github/workflows/zip_use_scripts.yml b/.github/workflows/zip_use_scripts.yml new file mode 100644 index 0000000..63f888b --- /dev/null +++ b/.github/workflows/zip_use_scripts.yml @@ -0,0 +1,32 @@ +name: Zip and Commit Files + +on: + push: + paths: + - 'scripts/**' + +jobs: + zip-and-commit: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Fetch all history for all tags and branches + + - name: Zip ps1 Files + run: | + zip -r scripts/powershell.zip scripts/embed.ps1 scripts/classify.ps1 + + - name: Zip sh Files + run: | + zip -r scripts/bash.zip scripts/embed.sh scripts/classify.sh + + - name: Commit and Push + run: | + git config --global user.name 'GitHub Action' + git config --global user.email 'action@github.com' + git add scripts/powershell.zip + git add scripts/bash.zip + git commit -m "Update archive.zip" || echo "No changes to commit" + git push \ No newline at end of file diff --git a/scripts/Readme.md b/scripts/Readme.md index 2184be6..18b3084 100644 --- a/scripts/Readme.md +++ b/scripts/Readme.md @@ -5,8 +5,8 @@ Go to https://www.docker.com/get-started/ and install Docker for your computer i # Step 2. Embed audio 1. Download the embed script from this directory - - Windows: [embed.ps1](https://raw.githubusercontent.com/QutEcoacoustics/perch-runner/blob/docker-launch-scripts-and-tests/scripts/embed.ps1) - - Linux / x86 Mac: [embed.sh](https://raw.githubusercontent.com/QutEcoacoustics/perch-runner/blob/docker-launch-scripts-and-tests/scripts/embed.sh) + - Windows: [embed.ps1](https://raw.githubusercontent.com/QutEcoacoustics/perch-runner/docker-launch-scripts-and-tests/scripts/embed.ps1) + - Linux / x86 Mac: [embed.sh](https://raw.githubusercontent.com/QutEcoacoustics/perch-runner/docker-launch-scripts-and-tests/scripts/embed.sh) 2. Open a terminal window 2. Change directory to this scripts directory 3. Run the following command: @@ -21,8 +21,8 @@ Notes # Step 3. Classify embeddings 1. Download the classify script from this directory - - Windows: [classify.ps1](https://raw.githubusercontent.com/QutEcoacoustics/perch-runner/blob/docker-launch-scripts-and-tests/scripts/classify.ps1) - - Linux / x86 Mac: [classify.sh](https://raw.githubusercontent.com/QutEcoacoustics/perch-runner/blob/docker-launch-scripts-and-tests/scripts/classify.sh) + - Windows: [classify.ps1](https://raw.githubusercontent.com/QutEcoacoustics/perch-runner/docker-launch-scripts-and-tests/scripts/classify.ps1) + - Linux / x86 Mac: [classify.sh](https://raw.githubusercontent.com/QutEcoacoustics/perch-runner/docker-launch-scripts-and-tests/scripts/classify.sh) 2. Open a terminal window 2. Change directory to this scripts directory 3. Run the following command: