https://github.com/nxtlvlsoftware/tar-ops-action
GitHub action for running tar operations in actions workflows.
https://github.com/nxtlvlsoftware/tar-ops-action
Last synced: 5 months ago
JSON representation
GitHub action for running tar operations in actions workflows.
- Host: GitHub
- URL: https://github.com/nxtlvlsoftware/tar-ops-action
- Owner: NxtLvLSoftware
- License: mit
- Created: 2022-04-19T06:49:26.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-31T21:07:21.000Z (over 2 years ago)
- Last Synced: 2025-02-01T09:41:27.205Z (over 1 year ago)
- Language: TypeScript
- Size: 8.19 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Action nxtlvlsoftware/tar-ops-action
GitHub action for running tar operations in actions workflows.
| Action Input | Required | Default | Description |
|--------------|----------|--------------------|--------------------------------------------------------------------------------------------------------------------------|
| operation | true | | Specifies the tar operation to run. Options are: compress (alias = c) OR extract (alias = x) |
| files | true | | Specifies the files to compress OR a single tar archive to extract. List syntax supported (see example below.) |
| outPath | true | | Specifies the output tar file OR the directory to extract files to. |
| cwd | false | action working dir | Specifies the current working directory for operations (will be prepended to files and outPath if they're not absolute.) |
## How to use
Simple tar archive creation and artifact upload:
```yml
name: My Workflow
on: [push]
jobs:
create-archive:
name: tar
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: nxtlvlsoftware/tar-ops-action@v1
with:
operation: compress
files: |
My-Repo/index.ts
My-Repo/src
My-Repo/node_modules
outPath: My-Repo-Sources.tar.gz
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: My-Repo-Sources-Compressed
path: My-Repo-Sources.tar.gz
retention-days: 1
```
Then download and extract your archive in another run step:
```yml
name: My Workflow 2
on: [push]
jobs:
setup-php:
name: tar extract
runs-on: ubuntu-latest
steps:
- name: Download all artifacts from this action run
uses: actions/download-artifact@v3
with:
path: ./
- uses: nxtlvlsoftware/tar-ops-action@v1
with:
operation: extract
files: ./My-Repo-Sources.tar.gz
outPath: ./My-Repo-Sources
```
## Use cases
Allows checking-out your repo, running dependency management commands, code linting and other build/compile time steps, then re-using the processed code across multiple steps without running all the prerequisites again.
## License
`nxtlvlsoftware/tar-ops-action` is open-sourced software licensed under the [MIT license](LICENSE).