Skip to content

Commit

Permalink
Push manylinux image to docker hub
Browse files Browse the repository at this point in the history
  • Loading branch information
kleag committed Apr 29, 2024
1 parent 66371ef commit 4297247
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 36 deletions.
30 changes: 3 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,30 +129,6 @@ jobs:
large-packages: false
swap-storage: true
- name: Build image
run: docker build -f ./Dockerfile-manylinux2.28 -t aymara/qhttpserver-manylinux2.28:build .
- name: Extract package and version number from docker image
id: extract
shell: bash
run: |
dockerImage="aymara/qhttpserver-manylinux2.28:build"
packageDir="/usr/share/apps/qhttpserver/packages/"
cicd/extract_package.sh $dockerImage $packageDir $GITHUB_OUTPUT
- name: Upload nightly build package
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
shell: bash
run: |
tagName=${{ steps.extract.outputs.version }}-nightly
gh release create --prerelease ${tagName} || /bin/true
gh release upload ${tagName} --clobber ./${{ steps.extract.outputs.filename }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload release package
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
name: ${{ steps.extract.outputs.version }}
files: |
./${{ steps.extract.outputs.filename }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

run: docker build -f ./Dockerfile-manylinux2.28 -t aymara/qhttpserver-manylinux2.28-qt${QT_VERSION}:latest .
- name: "Push image"
run: docker push aymara/qhttpserver-manylinux2.28-qt${QT_VERSION}:latest
2 changes: 1 addition & 1 deletion Dockerfile-debian12
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN echo "export packagefile=`find /src/qhttpserver/build/ -maxdepth 1 -name *.d
RUN echo "export fullname=\$(basename -- \$packagefile)" >> /envfile
RUN echo "export extension=\${fullname##*.}" >> /envfile
RUN echo "export filename=\${fullname%.*}" >> /envfile
RUN . /envfile && install -D ${packagefile} "/usr/share/apps/qhttpserver/packages/${filename}-debian12.deb"
RUN . /envfile && install -D ${packagefile} "/usr/share/apps/qhttpserver/packages/${filename}-debian12r.deb"

## install github-release to be able to deploy packages
#RUN wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2 && tar xjf linux-amd64-github-release.tar.bz2 && cp bin/linux/amd64/github-release /usr/bin
16 changes: 8 additions & 8 deletions Dockerfile-manylinux2.28
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ RUN install -d /src/qhttpserver/build

# Build
WORKDIR /src/qhttpserver/build
RUN cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
RUN ninja all && ninja package
RUN echo "export packagefile=`find /src/qhttpserver/build/ -maxdepth 1 -name *.tar.gz`" > /envfile
RUN echo "export fullname=\$(basename -- \$packagefile)" >> /envfile
RUN echo "export extension=\${fullname##*.}" >> /envfile
RUN echo "export filename=\${fullname%.*}" >> /envfile
RUN cat /envfile
RUN source /envfile && install -D ${packagefile} "/usr/share/apps/qhttpserver/packages/${filename}-manylinux_2_28.deb"
RUN cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/opt/qhttpserver -DCMAKE_BUILD_TYPE=Release ..
RUN ninja all && ninja install
#RUN echo "export packagefile=`find /src/qhttpserver/build/ -maxdepth 1 -name *.tar.gz`" > /envfile
#RUN echo "export fullname=\$(basename -- \$packagefile)" >> /envfile
#RUN echo "export extension=\${fullname##*.}" >> /envfile
#RUN echo "export filename=\${fullname%.*}" >> /envfile
#RUN cat /envfile
#RUN source /envfile && install -D ${packagefile} "/usr/share/apps/qhttpserver/packages/${filename}-manylinux_2_28.deb"


0 comments on commit 4297247

Please sign in to comment.