From 304316b59150d3c71b3039179b32e7f369bf8b5a Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 17 Jan 2023 14:06:55 +0800 Subject: [PATCH] #140 custom docker image --- .github/workflows/ci.yml | 16 ++-------------- .gitignore | 3 ++- README.md | 3 ++- devops/ubuntu/Dockerfile | 17 +++++++++++++++++ devops/ubuntu/action.yml | 8 ++++++++ devops/ubuntu/entrypoint.sh | 3 +++ 6 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 devops/ubuntu/Dockerfile create mode 100644 devops/ubuntu/action.yml create mode 100755 devops/ubuntu/entrypoint.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9deaee..923c868 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,13 +69,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: build tauri for Linux - run: | - sudo apt-get update - sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf pkg-config libatomic1 - sh <(curl https://tea.xyz) --yes - sh <(curl https://tea.xyz) +nodejs.org +pnpm.io +rust-lang.org - sh <(curl https://tea.xyz) pnpm install - sh <(curl https://tea.xyz) pnpm build:gui + uses: ./devops/ubuntu - uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} @@ -153,13 +147,7 @@ jobs: # uses: teaxyz/setup@v0 if: startsWith(matrix.platform.name, 'linux') # TODO: https://tauri.app/v1/guides/distribution/sign-linux - run: | - sudo apt-get update - sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf pkg-config libatomic1 - sh <(curl https://tea.xyz) --yes - sh <(curl https://tea.xyz) +nodejs.org +pnpm.io +rust-lang.org - sh <(curl https://tea.xyz) pnpm install - sh <(curl https://tea.xyz) pnpm build:gui + uses: ./devops/ubuntu - name: build platform output id: build_platform diff --git a/.gitignore b/.gitignore index f26a964..21bcdde 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules yarn-error.log -.DS_Store \ No newline at end of file +.DS_Store +.pnpm-store \ No newline at end of file diff --git a/README.md b/README.md index 0f03c31..486af93 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,8 @@ For better documentation checkout this [notion](https://www.notion.so/teaxyz/tea | nodejs.org | >=16 | | pnpm.io | >=7.18.2 | | rust-lang.org | >=1.62 | - +| rust-lang.org/cargo | >=0.66 | +| xcfile.dev | >=0.0.110 | ## Tasks diff --git a/devops/ubuntu/Dockerfile b/devops/ubuntu/Dockerfile new file mode 100644 index 0000000..27822a2 --- /dev/null +++ b/devops/ubuntu/Dockerfile @@ -0,0 +1,17 @@ + +FROM ubuntu:20.04 + +RUN apt-get update +ARG DEBIAN_FRONTEND=noninteractive +RUN apt-get install -y libgtk-3-dev webkit2gtk-4.0 +RUN apt-get install -y --fix-missing libappindicator3-dev librsvg2-dev +RUN apt-get install -y --fix-missing patchelf pkg-config curl libatomic1 gcc-multilib libsoup-gnome2.4 +RUN apt-get install -y libjavascriptcoregtk-4.0-dev wget +RUN curl https://tea.xyz -o ./tea.sh +RUN chmod +x tea.sh +RUN ./tea.sh --yes +# Copies your code file from your action repository to the filesystem path `/` of the container +COPY entrypoint.sh /entrypoint.sh + +# Code file to execute when the docker container starts up (`entrypoint.sh`) +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/devops/ubuntu/action.yml b/devops/ubuntu/action.yml new file mode 100644 index 0000000..e067cd1 --- /dev/null +++ b/devops/ubuntu/action.yml @@ -0,0 +1,8 @@ +name: 'Tea Ubuntu' +description: 'build gui using custom ubuntu' + +runs: + using: 'docker' + image: 'Dockerfile' + args: + - build \ No newline at end of file diff --git a/devops/ubuntu/entrypoint.sh b/devops/ubuntu/entrypoint.sh new file mode 100755 index 0000000..773f7c2 --- /dev/null +++ b/devops/ubuntu/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/sh -l +tea -SE . +tea -ES xc build \ No newline at end of file