Skip to content

Commit

Permalink
Separate download and extract script, use native commands for downloa…
Browse files Browse the repository at this point in the history
…d, and quiet AppImage extraction
  • Loading branch information
AnimMouse committed Oct 6, 2023
1 parent 60d197b commit 6790221
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
7 changes: 7 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ runs:
name: ${{ inputs.name }}
url: ${{ inputs.url }}

- name: Extract AppImage app
shell: bash
working-directory: ${{ runner.temp }}
run: $GITHUB_ACTION_PATH/scripts/extract.sh
env:
name: ${{ inputs.name }}

- name: Install AppImage app on tool cache
uses: AnimMouse/tool-cache@v1
with:
Expand Down
7 changes: 1 addition & 6 deletions scripts/download.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/sh
set -eu
echo ::group::Downloading $name AppImage
aria2c -o $name.AppImage -x 16 $url
chmod +x $name.AppImage
./$name.AppImage --appimage-extract
mv ./squashfs-root ./$name
mv ./$name/AppRun ./$name/$name
rm $name.AppImage
wget -qO $name.AppImage $url
echo ::endgroup::
9 changes: 9 additions & 0 deletions scripts/extract.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
set -eu
echo ::group::Extracting $name AppImage
chmod +x $name.AppImage
./$name.AppImage --appimage-extract > /dev/null
mv ./squashfs-root ./$name
mv ./$name/AppRun ./$name/$name
rm $name.AppImage
echo ::endgroup::

0 comments on commit 6790221

Please sign in to comment.