From 32bf2eaf2b186dc9908496d6ea00b5954dd8e967 Mon Sep 17 00:00:00 2001 From: Dag Heyman Date: Wed, 18 Sep 2019 15:02:55 +0200 Subject: [PATCH] actions: build appimage --- .github/workflows/appimage.yml | 27 +++++++++++++++++++++++++++ docker/xenial-appimage/Dockerfile | 16 ++++++++-------- 2 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/appimage.yml diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml new file mode 100644 index 00000000..1e6e0bbe --- /dev/null +++ b/.github/workflows/appimage.yml @@ -0,0 +1,27 @@ +name: Build AppImage + +on: [push] + +jobs: + build: + + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v1 + + - name: Build docker image that produces the AppImage + run: | + export REF=$(echo ${GITHUB_REF} | tr / -) + docker build -t xenial-appimage -f docker/xenial-appimage/Dockerfile . + id=$(docker create --privileged xenial-appimage) + docker start --attach $id + docker cp $id:/yubioath-desktop/Yubico_Authenticator-x86_64.AppImage yubioath-desktop-${REF}.AppImage + + - name: Push artifact to s3 + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + run: | + export REF=$(echo ${GITHUB_REF} | tr / -) + aws s3 mv yubioath-desktop-${REF}.AppImage s3://yubico-builds/yubioath-desktop/yubioath-desktop-${REF}.AppImage --acl public-read diff --git a/docker/xenial-appimage/Dockerfile b/docker/xenial-appimage/Dockerfile index 94b108c5..a1acfe72 100644 --- a/docker/xenial-appimage/Dockerfile +++ b/docker/xenial-appimage/Dockerfile @@ -24,23 +24,23 @@ ENV LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRA RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash \ && eval "$(pyenv init -)" \ && pyenv update \ - && pyenv install --force 3.6.5 \ - && pyenv global 3.6.5 \ - && wget https://github.com/thp/pyotherside/archive/1.5.3.tar.gz \ - && tar -xzvf 1.5.3.tar.gz \ - && echo "DEFINES += QT_NO_DEBUG_OUTPUT" >> pyotherside-1.5.3/src/src.pro \ - && cd pyotherside-1.5.3/src \ + && pyenv install --force 3.7.4 \ + && pyenv global 3.7.4 \ + && wget https://github.com/thp/pyotherside/archive/1.5.8.tar.gz \ + && tar -xzvf 1.5.8.tar.gz \ + && echo "DEFINES += QT_NO_DEBUG_OUTPUT" >> pyotherside-1.5.8/src/src.pro \ + && cd pyotherside-1.5.8/src \ && qmake \ && make \ && make install COPY . yubioath-desktop RUN mkdir -p yubioath-desktop/appDir/usr \ && eval "$(pyenv init -)" \ - && pyenv global 3.6.5 \ + && pyenv global 3.7.4 \ && cd yubioath-desktop \ && pip3 install --upgrade pip \ && pip3 install -r requirements.txt \ - && cp -R /root/.pyenv/versions/3.6.5/* appDir/usr \ + && cp -R /root/.pyenv/versions/3.7.4/* appDir/usr \ && apt-get download libykpers-1-1 \ && dpkg -x libykpers*.deb appDir/ \ && qmake \