#140 custom docker image

This commit is contained in:
neil 2023-01-17 14:06:55 +08:00
parent 1fc9c9dc08
commit 304316b591
6 changed files with 34 additions and 16 deletions

View file

@ -69,13 +69,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: build tauri for Linux - name: build tauri for Linux
run: | uses: ./devops/ubuntu
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: aws-actions/configure-aws-credentials@v1 - uses: aws-actions/configure-aws-credentials@v1
with: with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
@ -153,13 +147,7 @@ jobs:
# uses: teaxyz/setup@v0 # uses: teaxyz/setup@v0
if: startsWith(matrix.platform.name, 'linux') if: startsWith(matrix.platform.name, 'linux')
# TODO: https://tauri.app/v1/guides/distribution/sign-linux # TODO: https://tauri.app/v1/guides/distribution/sign-linux
run: | uses: ./devops/ubuntu
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
- name: build platform output - name: build platform output
id: build_platform id: build_platform

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
node_modules node_modules
yarn-error.log yarn-error.log
.DS_Store .DS_Store
.pnpm-store

View file

@ -13,7 +13,8 @@ For better documentation checkout this [notion](https://www.notion.so/teaxyz/tea
| nodejs.org | >=16 | | nodejs.org | >=16 |
| pnpm.io | >=7.18.2 | | pnpm.io | >=7.18.2 |
| rust-lang.org | >=1.62 | | rust-lang.org | >=1.62 |
| rust-lang.org/cargo | >=0.66 |
| xcfile.dev | >=0.0.110 |
## Tasks ## Tasks

17
devops/ubuntu/Dockerfile Normal file
View file

@ -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"]

8
devops/ubuntu/action.yml Normal file
View file

@ -0,0 +1,8 @@
name: 'Tea Ubuntu'
description: 'build gui using custom ubuntu'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- build

3
devops/ubuntu/entrypoint.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh -l
tea -SE .
tea -ES xc build