add GitHub actions workflow file (#2560)
This commit is contained in:
1 parent
4fe66e2143
commit
5a67104916
5 files changed
+67
-66
No files matched your search
@@ -1,18 +1,18 @@
|
||||
# https://github.com/travis-ci/travis-ci/issues/1754#issuecomment-497986438
|
||||
# Mirrored from https://github.com/k3it/qsorder/blob/master/test/prep-dummy-soundcard.sh
|
||||
|
||||
cat << EOF > /home/travis/.asoundrc
|
||||
cat << EOF > "$HOME"/.asoundrc
|
||||
pcm.dummy {
|
||||
type hw
|
||||
card 0
|
||||
}
|
||||
|
||||
|
||||
ctl.dummy {
|
||||
type hw
|
||||
card 0
|
||||
}
|
||||
EOF
|
||||
chmod go+r /home/travis/.asoundrc
|
||||
chmod go+r "$HOME"/.asoundrc
|
||||
cat << EOF >> /etc/modules.conf
|
||||
# OSS/Free portion - card #1
|
||||
alias sound-slot-0 snd-card-0
|
||||
@@ -22,6 +22,8 @@ alias sound-service-0-3 snd-pcm-oss
|
||||
alias sound-service-0-8 snd-seq-oss
|
||||
alias sound-service-0-12 snd-pcm-oss
|
||||
EOF
|
||||
modprobe snd-dummy
|
||||
# Commenting out this modprobe line for now. Otherwise the workflow fails that
|
||||
# the module can't be found.
|
||||
modprobe snd-dummy
|
||||
# ; modprobe snd-pcm-oss ; modprobe snd-mixer-oss ; modprobe snd-seq-oss
|
||||
mkdir -p tmp && chmod 777 tmp
|
||||
+13
-13
@@ -3,8 +3,8 @@
|
||||
URL=$(cat $1 | head -n 1)
|
||||
echo $URL
|
||||
|
||||
if [ x"$TRAVIS_PULL_REQUEST" == xfalse ] ; then
|
||||
git checkout "$TRAVIS_BRANCH"
|
||||
if [ "$IS_PULLREQUEST" = false ] ; then
|
||||
git checkout "$GITHUB_REF"
|
||||
fi
|
||||
|
||||
INPUTBASENAME=$(basename $1)
|
||||
@@ -92,7 +92,7 @@ if [ ! -f appdir-lint.sh ] ; then
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
|
||||
# If we have a type 2 AppImage, then mount it using appimagetool (not using itself for security reasons)
|
||||
if [ x"$TYPE" == x2 ] ; then
|
||||
if [ ! -e appimagetool-x86_64.AppImage ] ; then
|
||||
@@ -120,7 +120,7 @@ if [ x"$TYPE" == x1 ] ; then
|
||||
sudo mount "$FILENAME" -o ro,loop /mnt
|
||||
APPDIR=/mnt
|
||||
echo $APPDIR
|
||||
bash appdir-lint.sh "$APPDIR"
|
||||
bash appdir-lint.sh "$APPDIR"
|
||||
# https://github.com/AppImage/AppImageSpec/blob/master/draft.md#updateinformation
|
||||
UPDATE_INFORMATION=$(dd if="${FILENAME}" bs=1 skip=33651 count=512 2>/dev/null) || echo "Could not get update information from the AppImage"
|
||||
# later # sudo umount -l /mnt
|
||||
@@ -259,7 +259,7 @@ if [ $(($NUMBER_OF_WINDOWS)) -lt 1 ] ; then
|
||||
fi
|
||||
|
||||
# Works with Xvfb but cannot select window by ID
|
||||
# sudo apt-get -y install scrot
|
||||
# sudo apt-get -y install scrot
|
||||
# scrot -b 'screenshot_$wx$h.jpg' # -u gives "X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)"
|
||||
# mv screenshot_* database/$INPUTBASENAME/
|
||||
|
||||
@@ -283,7 +283,7 @@ fi
|
||||
|
||||
# Works with Xvfb
|
||||
# sudo apt-get -y install x11-apps netpbm xdotool # We do this in .travis.yml
|
||||
# -display :99 needed here?
|
||||
# -display :99 needed here?
|
||||
# xwd -id $(xdotool getactivewindow) -silent | xwdtopnm | pnmtojpeg > database/$INPUTBASENAME/screenshot.jpg && echo "Snap!"
|
||||
mkdir -p database/$INPUTBASENAME/
|
||||
|
||||
@@ -449,7 +449,7 @@ sudo chmod a+x appstreamcli-x86_64.AppImage
|
||||
echo "" >> apps/$INPUTBASENAME.md
|
||||
echo "icons:" >> apps/$INPUTBASENAME.md
|
||||
echo " - $INPUTBASENAME/icons/$ICONSIZE/$ICONBASENAME" >> apps/$INPUTBASENAME.md
|
||||
fi
|
||||
fi
|
||||
# Screenshot
|
||||
if [ -f database/$INPUTBASENAME/*appdata.xml ] ; then
|
||||
SCREENSHOT=$(cat database/$INPUTBASENAME/*appdata.xml | xmlstarlet sel -t -m "/component/screenshots/screenshot[1]/image" -v . || true)
|
||||
@@ -533,13 +533,13 @@ echo "==========================================="
|
||||
|
||||
# If this a PR, then just check whether the files have generated
|
||||
# See https://github.com/AppImage/appimage.github.io/issues/476 for more information
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
if [ "$IS_PULLREQUEST" = true ]; then
|
||||
cat "apps/${INPUTBASENAME}.md" || exit 1
|
||||
cat "database/${INPUTBASENAME}/"*.desktop || exit 1 # Asterisk must not be inside quotes, https://travis-ci.org/AppImage/appimage.github.io/builds/360847207#L782
|
||||
ls -lh "database/${INPUTBASENAME}/screenshot.png" || exit 1
|
||||
curl --upload-file "database/${INPUTBASENAME}/screenshot.png" https://transfer.sh/screenshot.png
|
||||
echo ""
|
||||
echo "Since we are on a TRAVIS_PULL_REQUEST and the required files are there, we are assuming the test is OK"
|
||||
echo "We will assume the test is OK (a pull request event was triggered and the required files exist)."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -547,17 +547,17 @@ fi
|
||||
# https://gist.github.com/willprice/e07efd73fb7f13f917ea
|
||||
|
||||
git pull # To prevent from: error: failed to push some refs to 'https://[secure]@github.com/AppImage/AppImageHub.git'
|
||||
git config --global user.email "[email protected]"
|
||||
git config --global user.name "Travis CI"
|
||||
#git config --global user.email "[email protected]"
|
||||
#git config --global user.name "Travis CI"
|
||||
set -x
|
||||
( cd database/ ; git diff ; git add . ; git rm *.yaml || true ) # Recursively add everything in this directory
|
||||
( cd apps/ ; git diff ; git add . || true ) # Recursively add everything in this directory
|
||||
git commit -F- <<EOF || true # Always succeeed (even if there was nothing to add)
|
||||
Add automatically parsed data ($TRAVIS_BUILD_NUMBER)
|
||||
Add automatically parsed data ($GITHUB_JOB)
|
||||
[ci skip]
|
||||
EOF
|
||||
set +x
|
||||
git remote add deploy https://${GITHUB_TOKEN}@github.com/$TRAVIS_REPO_SLUG.git > /dev/null 2>&1
|
||||
git remote add deploy https://${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY.git > /dev/null 2>&1
|
||||
# wrong logic? # if [ x"$TRAVIS_PULL_REQUEST" == x"false" ] ; then
|
||||
set -x
|
||||
git push --set-upstream deploy
|
||||
|
||||
Reference in new issue
Block a user