From c1e0bed669652225aa5bba76aa6130a58fe08605 Mon Sep 17 00:00:00 2001 From: Cubek Date: Fri, 6 Mar 2026 14:12:43 +0300 Subject: [PATCH 1/7] add simple gitdeps action --- action.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..3ddb961 --- /dev/null +++ b/action.yml @@ -0,0 +1,10 @@ +name: 'gitdeps action' +description: 'gitdeps' +runs: + using: 'composite' + steps: + - name: gitdeps installation + shell: bash + run: | + wget https://raw.githubusercontent.com/Nelonn/gitdeps/main/gitdeps.sh + sh gitdeps.sh \ No newline at end of file From 6713bd38bebfc4b0343c5e4d872be1c246d98680 Mon Sep 17 00:00:00 2001 From: Cubek Date: Fri, 6 Mar 2026 18:55:51 +0300 Subject: [PATCH 2/7] update .yml --- action.yml | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 3ddb961..fd09017 100644 --- a/action.yml +++ b/action.yml @@ -3,8 +3,81 @@ description: 'gitdeps' runs: using: 'composite' steps: - - name: gitdeps installation + # GET INFO PARTS + - name: get sys info (Unix) shell: bash + if: os.runner != 'Windows' run: | - wget https://raw.githubusercontent.com/Nelonn/gitdeps/main/gitdeps.sh - sh gitdeps.sh \ No newline at end of file + set -e + cd "`dirname "$0"`" + VERSION="0.2.2" + + RELEASES_URL="https://github.com/Nelonn/gitdeps/releases/download" + OS_ARCH=$(echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`) + + if [ "$(uname)" = "Darwin" ]; then + BASE_NAME=gitdeps_${VERSION}_darwin_${OS_ARCH} + FILE_NAME=${BASE_NAME}.zip + else + BASE_NAME=gitdeps_${VERSION}_linux_${OS_ARCH} + FILE_NAME=${BASE_NAME}.tar.gz + fi + + - name: get sys info (Windows) + shell: pwsh + if: os.runner == 'Windows' + run: | + $extractPath = ".gitdeps" + $arch = (Get-WmiObject Win32_Processor).Architecture + + if ($arch -eq 12) { + $url = "https://github.com/Nelonn/gitdeps/releases/download/v0.2.2/gitdeps_0.2.2_windows_arm64.zip" + } elseif ($arch -eq 9) { + $url = "https://github.com/Nelonn/gitdeps/releases/download/v0.2.2/gitdeps_0.2.2_windows_amd64.zip" + } elseif ($arch -eq 0) { + $url = "https://github.com/Nelonn/gitdeps/releases/download/v0.2.2/gitdeps_0.2.2_windows_386.zip" + } else { + Write-Error "Unsupported architecture: $arch" + exit 1 + } + # DOWNLOAD PART + - name: download archive (Unix) + shell: bash + if: os.runner == 'Unix' + run: | + echo Downloading ${RELEASES_URL}/v${VERSION}/${FILE_NAME} + curl --create-dirs -LO --output-dir .gitdeps ${RELEASES_URL}/v${VERSION}/${FILE_NAME} + + - name: download archive (Windows) + shell: pwsh + if: os.runner == 'Windows' + run: Invoke-WebRequest -Uri $url -OutFile $outputPath + + # EXTRACT PART + - name: extract archive (Linux) + shell: bash + if: os.runner == 'Linux' + run: tar -xf .gitdeps/${FILE_NAME} -C .gitdeps + + - name: extract archive (Linux) + shell: bash + if: os.runner == 'macOS' + run: unzip .gitdeps/${FILE_NAME} -d .gitdeps + + - name: extract archive (Windows) + shell: pwsh + if: os.runner == 'Windows' + run: | + Expand-Archive -Path $outputPath -DestinationPath $extractPath -Force + Remove-Item $outputPath + + # RUN GITDEPS + - name: run gitdeps (Unix) + shell: bash + if: os.runner == 'Unix' + run: .gitdeps/${BASE_NAME}/gitdeps + + - name: run gitdeps (Windows) + shell: pwsh + if: os.runner == 'Windows' + run: .\gitdeps\gitdeps.exe \ No newline at end of file From 8661a308d155233d3def0c1ee5073bd8d9b9872d Mon Sep 17 00:00:00 2001 From: Cubek Date: Fri, 6 Mar 2026 20:39:22 +0300 Subject: [PATCH 3/7] some fixes --- action.yml | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/action.yml b/action.yml index fd09017..6fa18b4 100644 --- a/action.yml +++ b/action.yml @@ -4,9 +4,9 @@ runs: using: 'composite' steps: # GET INFO PARTS - - name: get sys info (Unix) + - name: get sys info (Linux) shell: bash - if: os.runner != 'Windows' + if: os.runner == 'Linux' run: | set -e cd "`dirname "$0"`" @@ -15,13 +15,22 @@ runs: RELEASES_URL="https://github.com/Nelonn/gitdeps/releases/download" OS_ARCH=$(echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`) - if [ "$(uname)" = "Darwin" ]; then - BASE_NAME=gitdeps_${VERSION}_darwin_${OS_ARCH} - FILE_NAME=${BASE_NAME}.zip - else - BASE_NAME=gitdeps_${VERSION}_linux_${OS_ARCH} - FILE_NAME=${BASE_NAME}.tar.gz - fi + BASE_NAME=gitdeps_${VERSION}_linux_${OS_ARCH} + FILE_NAME=${BASE_NAME}.tar.gz + + - name: get sys info (MacOS) + shell: bash + if: os.runner == 'macOS' + run: + set -e + cd "`dirname "$0"`" + VERSION="0.2.2" + + RELEASES_URL="https://github.com/Nelonn/gitdeps/releases/download" + OS_ARCH=$(echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`) + + BASE_NAME=gitdeps_${VERSION}_linux_${OS_ARCH} + FILE_NAME=${BASE_NAME}.zip - name: get sys info (Windows) shell: pwsh @@ -29,13 +38,14 @@ runs: run: | $extractPath = ".gitdeps" $arch = (Get-WmiObject Win32_Processor).Architecture + $VERSION = "0.2.2" if ($arch -eq 12) { - $url = "https://github.com/Nelonn/gitdeps/releases/download/v0.2.2/gitdeps_0.2.2_windows_arm64.zip" + $url = "https://github.com/Nelonn/gitdeps/releases/download/v$VERSION/gitdeps_$VERSION_windows_arm64.zip" } elseif ($arch -eq 9) { - $url = "https://github.com/Nelonn/gitdeps/releases/download/v0.2.2/gitdeps_0.2.2_windows_amd64.zip" + $url = "https://github.com/Nelonn/gitdeps/releases/download/v$VERSION/gitdeps_$VERSION_windows_amd64.zip" } elseif ($arch -eq 0) { - $url = "https://github.com/Nelonn/gitdeps/releases/download/v0.2.2/gitdeps_0.2.2_windows_386.zip" + $url = "https://github.com/Nelonn/gitdeps/releases/download/v$VERSION/gitdeps_$VERSION_windows_386.zip" } else { Write-Error "Unsupported architecture: $arch" exit 1 @@ -43,7 +53,7 @@ runs: # DOWNLOAD PART - name: download archive (Unix) shell: bash - if: os.runner == 'Unix' + if: os.runner != 'Windows' run: | echo Downloading ${RELEASES_URL}/v${VERSION}/${FILE_NAME} curl --create-dirs -LO --output-dir .gitdeps ${RELEASES_URL}/v${VERSION}/${FILE_NAME} @@ -59,7 +69,7 @@ runs: if: os.runner == 'Linux' run: tar -xf .gitdeps/${FILE_NAME} -C .gitdeps - - name: extract archive (Linux) + - name: extract archive (macOS) shell: bash if: os.runner == 'macOS' run: unzip .gitdeps/${FILE_NAME} -d .gitdeps @@ -80,4 +90,4 @@ runs: - name: run gitdeps (Windows) shell: pwsh if: os.runner == 'Windows' - run: .\gitdeps\gitdeps.exe \ No newline at end of file + run: .\gitdeps\gitdeps.exe From 5fc051d5b76f7a717d478fb7e7099075189dd621 Mon Sep 17 00:00:00 2001 From: Cubek Date: Fri, 6 Mar 2026 20:55:42 +0300 Subject: [PATCH 4/7] rename os.runner to runner.os and add inputs --- action.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/action.yml b/action.yml index 6fa18b4..b0393de 100644 --- a/action.yml +++ b/action.yml @@ -1,16 +1,21 @@ name: 'gitdeps action' description: 'gitdeps' +inputs: + gitdeps_ver: + description: 'set gitdeps version' + required: false + default: '0.2.2' runs: using: 'composite' steps: # GET INFO PARTS - name: get sys info (Linux) shell: bash - if: os.runner == 'Linux' + if: runner.os == 'Linux' run: | set -e cd "`dirname "$0"`" - VERSION="0.2.2" + VERSION=${{ inputs.gitdeps_ver }} RELEASES_URL="https://github.com/Nelonn/gitdeps/releases/download" OS_ARCH=$(echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`) @@ -20,7 +25,7 @@ runs: - name: get sys info (MacOS) shell: bash - if: os.runner == 'macOS' + if: runner.os == 'macOS' run: set -e cd "`dirname "$0"`" @@ -34,11 +39,11 @@ runs: - name: get sys info (Windows) shell: pwsh - if: os.runner == 'Windows' + if: runner.os == 'Windows' run: | $extractPath = ".gitdeps" $arch = (Get-WmiObject Win32_Processor).Architecture - $VERSION = "0.2.2" + $VERSION = "${{ inputs.gitdeps_ver }}" if ($arch -eq 12) { $url = "https://github.com/Nelonn/gitdeps/releases/download/v$VERSION/gitdeps_$VERSION_windows_arm64.zip" @@ -53,30 +58,30 @@ runs: # DOWNLOAD PART - name: download archive (Unix) shell: bash - if: os.runner != 'Windows' + if: runner.os != 'Windows' run: | echo Downloading ${RELEASES_URL}/v${VERSION}/${FILE_NAME} curl --create-dirs -LO --output-dir .gitdeps ${RELEASES_URL}/v${VERSION}/${FILE_NAME} - name: download archive (Windows) shell: pwsh - if: os.runner == 'Windows' + if: runner.os == 'Windows' run: Invoke-WebRequest -Uri $url -OutFile $outputPath # EXTRACT PART - name: extract archive (Linux) shell: bash - if: os.runner == 'Linux' + if: runner.os == 'Linux' run: tar -xf .gitdeps/${FILE_NAME} -C .gitdeps - name: extract archive (macOS) shell: bash - if: os.runner == 'macOS' + if: runner.os == 'macOS' run: unzip .gitdeps/${FILE_NAME} -d .gitdeps - name: extract archive (Windows) shell: pwsh - if: os.runner == 'Windows' + if: runner.os == 'Windows' run: | Expand-Archive -Path $outputPath -DestinationPath $extractPath -Force Remove-Item $outputPath @@ -84,10 +89,10 @@ runs: # RUN GITDEPS - name: run gitdeps (Unix) shell: bash - if: os.runner == 'Unix' + if: runner.os == 'Unix' run: .gitdeps/${BASE_NAME}/gitdeps - name: run gitdeps (Windows) shell: pwsh - if: os.runner == 'Windows' + if: runner.os == 'Windows' run: .\gitdeps\gitdeps.exe From c08e671eff6d6c9ef7571eb403e3c86f2278dbc0 Mon Sep 17 00:00:00 2001 From: Cubek Date: Fri, 6 Mar 2026 21:00:09 +0300 Subject: [PATCH 5/7] add custom gitdeps arguments to action --- action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index b0393de..d142f36 100644 --- a/action.yml +++ b/action.yml @@ -5,6 +5,10 @@ inputs: description: 'set gitdeps version' required: false default: '0.2.2' + gitdeps_args: + description: 'add custom gitdeps argument' + required: false + default: '' runs: using: 'composite' steps: @@ -90,9 +94,9 @@ runs: - name: run gitdeps (Unix) shell: bash if: runner.os == 'Unix' - run: .gitdeps/${BASE_NAME}/gitdeps + run: .gitdeps/${BASE_NAME}/gitdeps ${{ inputs.gitdeps_args }} - name: run gitdeps (Windows) shell: pwsh if: runner.os == 'Windows' - run: .\gitdeps\gitdeps.exe + run: .\gitdeps\gitdeps.exe ${{ inputs.gitdeps_args }} From 84cfbeaae446ec03e2232466db57ad628329e848 Mon Sep 17 00:00:00 2001 From: Cubek Date: Fri, 6 Mar 2026 21:06:37 +0300 Subject: [PATCH 6/7] fix windows version (dolbaeb blya( ) --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index d142f36..20e9d5f 100644 --- a/action.yml +++ b/action.yml @@ -50,11 +50,11 @@ runs: $VERSION = "${{ inputs.gitdeps_ver }}" if ($arch -eq 12) { - $url = "https://github.com/Nelonn/gitdeps/releases/download/v$VERSION/gitdeps_$VERSION_windows_arm64.zip" + $url = "https://github.com/Nelonn/gitdeps/releases/download/v${VERSION}/gitdeps_${VERSION}_windows_arm64.zip" } elseif ($arch -eq 9) { - $url = "https://github.com/Nelonn/gitdeps/releases/download/v$VERSION/gitdeps_$VERSION_windows_amd64.zip" + $url = "https://github.com/Nelonn/gitdeps/releases/download/v${VERSION}/gitdeps_${VERSION}_windows_amd64.zip" } elseif ($arch -eq 0) { - $url = "https://github.com/Nelonn/gitdeps/releases/download/v$VERSION/gitdeps_$VERSION_windows_386.zip" + $url = "https://github.com/Nelonn/gitdeps/releases/download/v${VERSION}/gitdeps_${VERSION}_windows_386.zip" } else { Write-Error "Unsupported architecture: $arch" exit 1 From b112970409e575de3b68f1a9fa92bafae1f9d702 Mon Sep 17 00:00:00 2001 From: Cubek Date: Fri, 6 Mar 2026 21:51:34 +0300 Subject: [PATCH 7/7] vibefixer --- action.yml | 72 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/action.yml b/action.yml index 20e9d5f..28988a2 100644 --- a/action.yml +++ b/action.yml @@ -6,49 +6,50 @@ inputs: required: false default: '0.2.2' gitdeps_args: - description: 'add custom gitdeps argument' + description: 'add gitdeps arguments' required: false default: '' runs: using: 'composite' steps: - # GET INFO PARTS - name: get sys info (Linux) shell: bash if: runner.os == 'Linux' run: | set -e - cd "`dirname "$0"`" - VERSION=${{ inputs.gitdeps_ver }} - - RELEASES_URL="https://github.com/Nelonn/gitdeps/releases/download" - OS_ARCH=$(echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`) - - BASE_NAME=gitdeps_${VERSION}_linux_${OS_ARCH} - FILE_NAME=${BASE_NAME}.tar.gz + VERSION="${{ inputs.gitdeps_ver }}" + OS_ARCH=$(uname -m | sed 's/aarch64/arm64/' | sed 's/x86_64/amd64/') + BASE_NAME="gitdeps_${VERSION}_linux_${OS_ARCH}" + FILE_NAME="${BASE_NAME}.tar.gz" + RELEASES_URL="https://github.com/Nelonn/gitdeps/releases/download" + echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "OS_ARCH=$OS_ARCH" >> $GITHUB_ENV + echo "BASE_NAME=$BASE_NAME" >> $GITHUB_ENV + echo "FILE_NAME=$FILE_NAME" >> $GITHUB_ENV + echo "RELEASES_URL=$RELEASES_URL" >> $GITHUB_ENV - - name: get sys info (MacOS) + - name: get sys info (macOS) shell: bash if: runner.os == 'macOS' - run: + run: | set -e - cd "`dirname "$0"`" - VERSION="0.2.2" - + VERSION="${{ inputs.gitdeps_ver }}" + OS_ARCH=$(uname -m | sed 's/aarch64/arm64/' | sed 's/x86_64/amd64/') + BASE_NAME="gitdeps_${VERSION}_darwin_${OS_ARCH}" + FILE_NAME="${BASE_NAME}.zip" RELEASES_URL="https://github.com/Nelonn/gitdeps/releases/download" - OS_ARCH=$(echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`) - - BASE_NAME=gitdeps_${VERSION}_linux_${OS_ARCH} - FILE_NAME=${BASE_NAME}.zip + echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "OS_ARCH=$OS_ARCH" >> $GITHUB_ENV + echo "BASE_NAME=$BASE_NAME" >> $GITHUB_ENV + echo "FILE_NAME=$FILE_NAME" >> $GITHUB_ENV + echo "RELEASES_URL=$RELEASES_URL" >> $GITHUB_ENV - name: get sys info (Windows) shell: pwsh if: runner.os == 'Windows' run: | - $extractPath = ".gitdeps" - $arch = (Get-WmiObject Win32_Processor).Architecture $VERSION = "${{ inputs.gitdeps_ver }}" - + $arch = (Get-WmiObject Win32_Processor).Architecture if ($arch -eq 12) { $url = "https://github.com/Nelonn/gitdeps/releases/download/v${VERSION}/gitdeps_${VERSION}_windows_arm64.zip" } elseif ($arch -eq 9) { @@ -59,44 +60,47 @@ runs: Write-Error "Unsupported architecture: $arch" exit 1 } - # DOWNLOAD PART + echo "GITDEPS_URL=$url" >> $env:GITHUB_ENV + - name: download archive (Unix) shell: bash if: runner.os != 'Windows' run: | - echo Downloading ${RELEASES_URL}/v${VERSION}/${FILE_NAME} - curl --create-dirs -LO --output-dir .gitdeps ${RELEASES_URL}/v${VERSION}/${FILE_NAME} + echo "Downloading ${RELEASES_URL}/v${VERSION}/${FILE_NAME}" + curl --create-dirs -LO --output-dir .gitdeps "${RELEASES_URL}/v${VERSION}/${FILE_NAME}" - name: download archive (Windows) shell: pwsh if: runner.os == 'Windows' - run: Invoke-WebRequest -Uri $url -OutFile $outputPath + run: | + $outputPath = ".gitdeps\gitdeps.zip" + New-Item -ItemType Directory -Force -Path ".gitdeps" | Out-Null + Invoke-WebRequest -Uri $env:GITDEPS_URL -OutFile $outputPath + echo "GITDEPS_ZIP=$outputPath" >> $env:GITHUB_ENV - # EXTRACT PART - name: extract archive (Linux) shell: bash if: runner.os == 'Linux' - run: tar -xf .gitdeps/${FILE_NAME} -C .gitdeps + run: tar -xf ".gitdeps/${FILE_NAME}" -C .gitdeps - name: extract archive (macOS) shell: bash if: runner.os == 'macOS' - run: unzip .gitdeps/${FILE_NAME} -d .gitdeps + run: unzip ".gitdeps/${FILE_NAME}" -d .gitdeps - name: extract archive (Windows) shell: pwsh if: runner.os == 'Windows' run: | - Expand-Archive -Path $outputPath -DestinationPath $extractPath -Force - Remove-Item $outputPath + Expand-Archive -Path $env:GITDEPS_ZIP -DestinationPath ".gitdeps" -Force + Remove-Item $env:GITDEPS_ZIP - # RUN GITDEPS - name: run gitdeps (Unix) shell: bash - if: runner.os == 'Unix' + if: runner.os != 'Windows' run: .gitdeps/${BASE_NAME}/gitdeps ${{ inputs.gitdeps_args }} - name: run gitdeps (Windows) shell: pwsh if: runner.os == 'Windows' - run: .\gitdeps\gitdeps.exe ${{ inputs.gitdeps_args }} + run: .\.gitdeps\gitdeps.exe ${{ inputs.gitdeps_args }} \ No newline at end of file