Code Monkey home page Code Monkey logo

action-zip's Introduction

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:

- uses: montudor/action-zip@v1
  with:
    args: zip -qq -r dir.zip dir

Unzipping a dir.zip file:

- uses: montudor/action-zip@v1
  with:
    args: unzip -qq dir.zip -d dir

Zipping a folder from a different work dir

- 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:

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

action-zip's People

Contributors

montudor avatar rdeluxe avatar ana06 avatar wyrihaximus avatar tomchavakis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.