Skip to content

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

License

Notifications You must be signed in to change notification settings

AnimMouse/setup-p7zip-fork

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Setup new p7zip fork for GitHub Actions

Setup new p7zip fork (7zip CLI for Linux) on GitHub Actions to use /opt/7z.

This action installs the new p7zip fork 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), Brotli, LZ4, LZ5, Lizard, and 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.

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:

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 along with the new p7zip fork.
Also, p7zip does not want to run on relative path.

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