-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marco
authored
Mar 11, 2024
1 parent
a956b55
commit bf4e669
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Release New Action Version | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
release-action: | ||
name: Release new version | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Bump Version | ||
uses: patriotsoftware/semver-bump-action@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: 'Windows Extract from Zip' | ||
author: DevOps | ||
description: Windows Extract file/folder from zip | ||
|
||
inputs: | ||
zip-path: | ||
description: 'Helm Namespace' | ||
required: true | ||
extract-path: | ||
description: 'Path to file/folder to extract relative to zip' | ||
required: true | ||
destination-path: | ||
description: 'Destination path' | ||
required: false | ||
default: '.\' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Extract file/folder | ||
shell: powershell | ||
run: | | ||
Add-Type -AssemblyName System.IO.Compression.FileSystem | ||
$zip = [System.IO.Compression.ZipFile]::OpenRead("${{ inputs.zip-path }}") | ||
$zip.Entries | Where-Object { $_.FullName -like "${{ inputs.extract-path }}/*" } | | ||
ForEach-Object { | ||
$root = Join-Path ${{ inputs.destination-path }} $_.FullName | ||
if (-not (Test-Path $(Split-Path -Path $root -Parent))) { | ||
New-Item $(Split-Path -Path $root -Parent) -Type Directory -Force | Out-Null | ||
} | ||
if (-not $_.FullName.EndsWith("/")) { | ||
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $root, $true) | ||
} | ||
} | ||
$zip.Dispose() |