Skip to content

Update Flathub Screenshot #25

Update Flathub Screenshot

Update Flathub Screenshot #25

name: Update Flathub Screenshot
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Screenshots
run: |
curl -fsSL https://ppa.ablaze.one/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/Floorp.gpg
sudo curl -sS --compressed -o /etc/apt/sources.list.d/Floorp.list 'https://ppa.ablaze.one/Floorp.list'
sudo apt update
sudo apt install imagemagick floorp openbox obconf xorg gpg
Xvfb :2 -screen 0 1920x1080x24 &
export DISPLAY=:2
sleep 10
/usr/bin/openbox-session &
mkdir ~/floorp-profile
cp -f $(pwd)/workflow-files/user.js ~/floorp-profile/user.js
sleep 10
floorp -foreground -height 1080 -width 1920 -setDefaultBrowser &
sleep 10
pkill floorp
floorp -foreground about:newtab -height 1080 -width 1920 &
sleep 10
import -window root -crop 1920x1080+0+0 $(pwd)/flathub-screenshot-white1.png
sleep 10
pkill floorp
floorp -foreground about:newtab -url https://floorp.app/ -height 1080 -width 1920 &
sleep 10
import -window root -crop 1920x1080+0+0 $(pwd)/flathub-screenshot-white2.png
sleep 10
pkill floorp
floorp -foreground about:newtab --profile ~/floorp-profile -height 1080 -width 1920 &
sleep 10
import -window root -crop 1920x1080+0+0 $(pwd)/flathub-screenshot-black1.png
sleep 10
pkill floorp
floorp -foreground about:newtab -url https://floorp.app/ --profile ~/floorp-profile -height 1080 -width 1920 &
sleep 10
import -window root -crop 1920x1080+0+0 $(pwd)/flathub-screenshot-black2.png
pkill floorp
rm -rf ~/floorp-profile
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "[FB] Floorp | Update Flathub Picture"
git push origin