Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/animmouse/setup-p7zip-fork

Setup/Install new p7zip fork with additional codecs for GitHub Actions
https://github.com/animmouse/setup-p7zip-fork

7z 7zip action actions archive archiver brotli compression flzma2 github-actions lizard lz4 lz5 p7zip zstandard zstd

Last synced: 19 days ago
JSON representation

Setup/Install new p7zip fork with additional codecs for GitHub Actions

Awesome Lists containing this project

README

        

# Setup new p7zip fork for GitHub Actions
Setup [new p7zip fork](https://github.com/jinfeihan57/p7zip) (7zip CLI for Linux) on GitHub Actions to use `/opt/7z`.

This action installs the [new p7zip fork](https://github.com/jinfeihan57/p7zip) with additional codecs and improvements for use in actions by installing it on /opt.

With the new p7zip fork, you can now use [Zstandard (`zstd`)](https://github.com/facebook/zstd/), [Brotli](https://github.com/google/brotli/), [LZ4](https://github.com/lz4/lz4/), [LZ5](https://github.com/inikep/lz5/), [Lizard](https://github.com/inikep/lizard/), and [Fast LZMA2](https://github.com/conor42/fast-lzma2) on p7zip in GitHub Actions.

This action only works on Ubuntu 20.04 and up virtual environments as 18.04 and below does not have GLIBC_2.29.

## Usage
To use `/opt/7z`, run this action before `/opt/7z`.

```yml
steps:
- uses: actions/checkout@v2

- name: Setup p7zip fork
uses: AnimMouse/setup-p7zip-fork@v1

- run: /opt/7z a archive.7z -m0=bcj -m1=zstd -mx22
```

## Set version
To use version other than the latest one:

```yml
steps:
- name: Setup p7zip fork
uses: AnimMouse/setup-p7zip-fork@v1
with:
version: v17.04 # Set the version to use. Default: v17.04

- run: /opt/7z i
```

### Why `/opt/7z`?
So that we can also use the original [p7zip](https://sourceforge.net/projects/p7zip/) along with the new p7zip fork.\
Also, p7zip [does not want to run on relative path](https://sourceforge.net/p/p7zip/discussion/383044/thread/5e4085ab/).

```yml
steps:
- name: Setup p7zip fork
uses: AnimMouse/setup-p7zip-fork@v1

- name: Run p7zip fork
run: /opt/7z i

- name: Run original p7zip
run: 7z i
```