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