Skip to content

fix Dockerfile

fix Dockerfile #122

name: linux-pkg-build
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
tags:
- '*'
jobs:
auto-build:
environment: auto-build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: snickerbockers/submodules-init@v4
- name: Build the Docker image
run: |
sudo apt-get update --fix-missing
sudo apt-get install -y -f -o Acquire::Retries=3 cargo libfuse2
docker build -t oapi-build ./docker
docker run --device /dev/fuse --cap-add SYS_ADMIN --privileged=True -v $PWD:/oapi-cli oapi-build scl enable devtoolset-11 -- /oapi-cli/docker/make.sh cp
sudo chown $(whoami) -R ./docker-package/
./docker-package/oapi-cli-x86_64.AppImage --appimage-extract-and-run --help
./docker-package/oapi-cli-x86_64.AppImage --help
cp docker-package/oapi-cli-x86_64.AppImage .
make tests-appimage
- name: Upload artifacts
uses: actions/upload-artifact@v2
if: ${{ github.event_name != 'push' }}
with:
name: oapi-cli-linux
path: |
oapi-cli-x86_64.AppImage
- name: upload nightly
uses: "marvinpinto/action-automatic-releases@latest"
if: ${{ github.event_name == 'push' }}
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
automatic_release_tag: "nightly-linux"
title: "Linux Development Build"
files: |
oapi-cli-x86_64.AppImage
- name: upload release
uses: "marvinpinto/action-automatic-releases@latest"
if: startsWith(github.ref, 'refs/tags/v')
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ github.ref_name }}"
title: "Linux Development Build"
files: |
oapi-cli-x86_64.AppImage