https://github.com/sibiraj-s/action-archiver
Github action to generate tar/zip archives
https://github.com/sibiraj-s/action-archiver
actions archiver
Last synced: 5 months ago
JSON representation
Github action to generate tar/zip archives
- Host: GitHub
- URL: https://github.com/sibiraj-s/action-archiver
- Owner: sibiraj-s
- License: mit
- Created: 2021-12-24T04:36:13.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-11-25T08:00:06.000Z (7 months ago)
- Last Synced: 2025-11-28T15:07:16.162Z (7 months ago)
- Topics: actions, archiver
- Language: TypeScript
- Homepage: https://github.com/marketplace/actions/action-archiver
- Size: 2.08 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# action-archiver
> Github action to generate tar/zip archives
[](https://github.com/sibiraj-s/action-archiver/actions/workflows/test.yml)
## Usage
```yml
name: Build
on:
push:
branches:
- production
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm run build
- uses: sibiraj-s/action-archiver@v1
with:
working-directory: './'
path: 'dist/**'
format: tar # default
output: dist.tar
```
**Creating gzip archive:**
```yml
steps:
- uses: sibiraj-s/action-archiver@v1
with:
path: '**/*.js'
format: zip
output: dist.zip
compression-level: 4 # default, see https://nodejs.org/api/zlib.html#class-options
```
**Compress tar archive with gzip**
```yml
steps:
- uses: sibiraj-s/action-archiver@v1
with:
path: '**/*.js'
format: tar
gzip: true
output: dist.tar.gz
```
**Ignore files**
```yml
steps:
- uses: sibiraj-s/action-archiver@v1
with:
path: '**/*'
output: dist.tar
ignore: |
**/*.md
**/*.yml
```
## Security
For better security it is recommended to pin actions to a full length commit SHA.
Read more on [using third-party actions](https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions)