Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/montudor/action-zip
A GitHub action used to zip file contents
https://github.com/montudor/action-zip
automation github-actions zip
Last synced: 11 days ago
JSON representation
A GitHub action used to zip file contents
- Host: GitHub
- URL: https://github.com/montudor/action-zip
- Owner: montudor
- License: mit
- Created: 2019-07-18T10:17:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-03T03:12:04.000Z (10 months ago)
- Last Synced: 2024-10-20T05:42:55.976Z (22 days ago)
- Topics: automation, github-actions, zip
- Language: Dockerfile
- Homepage:
- Size: 15.6 KB
- Stars: 112
- Watchers: 3
- Forks: 31
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Zip Files Action
This GitHub action exposes the zip command for use in building/archiving. It is important to note that this action currently only supports Linux.
## Usage
Zipping the directory `dir` into `dir.zip`:
```yaml
- uses: montudor/action-zip@v1
with:
args: zip -qq -r dir.zip dir
```Unzipping a `dir.zip` file:
```yaml
- uses: montudor/action-zip@v1
with:
args: unzip -qq dir.zip -d dir
```Zipping a folder from a different work dir
```yaml
- name: Install zip
uses: montudor/action-zip@v1- name: Zip output
run: zip -qq -r function.zip dist node_modules package.json
working-directory: path/to/work-dir
```Reusing the same zip between steps in a `PHP` CI with unit and mutation tests:
```yaml
name: Continuous Integration
on:
push:
pull_request:
jobs:
composer-install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: composer install --ansi --no-progress --no-interaction --prefer-dist
- uses: montudor/action-zip@v1
with:
args: zip -qq -r vendor.zip vendor
- uses: actions/upload-artifact@v2
with:
name: vendor.zip
tests:
needs: composer-install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/download-artifact@v2
with:
name: vendor.zip
- uses: montudor/action-zip@v1
with:
args: unzip -qq vendor.zip -d vendor
- run: ./vendor/bin/phpunit
mutation:
needs: composer-install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/download-artifact@v2
with:
name: vendor.zip
- uses: montudor/action-zip@v1
with:
args: unzip -qq vendor.zip -d vendor
- run: ./vendor/bin/infection
```