Add Dockerfile #66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux | |
on: | |
push: | |
branches: [ "main", "dev" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
steps: | |
- name: Installation | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev p7zip gobjc g++-13 wget | |
g++-13 -v | |
export CXX=g++-13 | |
export CC=gcc-13 | |
wget https://github.com/xmake-io/xmake/releases/download/v2.8.1/xmake-v2.8.1.xz.run | |
chmod 777 xmake-v2.8.1.xz.run > a.txt | |
./xmake-v2.8.1.xz.run | |
export XMAKE_ROOT="y" | |
source ~/.xmake/profile | |
xmake --version | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: build | |
run: | | |
export XMAKE_ROOT="y" | |
source ~/.xmake/profile | |
g++-13 -v | |
export CXX=g++-13 | |
export CC=gcc-13 | |
xmake build -y | |
xmake install -o . | |
ldd ./bin/cpp-freegpt-webui | |
- name: Docker login | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build the Docker image | |
run: | | |
pwd | |
ls | |
docker build . -t ${{ secrets.DOCKERHUB_USERNAME }}/freegpt:latest | |
- name: Docker image push | |
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/freegpt:latest |