Add image for dioxus build
This commit is contained in:
@@ -34,3 +34,38 @@ jobs:
|
||||
tags: "${{ steps.get-image-name.outputs.IMAGE_NAME }}:latest,${{ steps.get-image-name.outputs.IMAGE_NAME }}:cargo-leptos-0-2-22"
|
||||
cache-from: type=registry,ref=${{ steps.get-image-name.outputs.IMAGE_NAME }}:latest
|
||||
cache-to: type=inline
|
||||
|
||||
docker-build-dx:
|
||||
runs-on: ubuntu-latest-docker
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Gitea container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.registry }}
|
||||
username: ${{ env.actions_user }}
|
||||
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
|
||||
- name: Get Image Name
|
||||
id: get-image-name
|
||||
run: |
|
||||
echo "IMAGE_NAME=$(echo ${{ env.registry }}/${{ gitea.repository }}-dx | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
file: Dockerfile.dx
|
||||
push: true
|
||||
tags: "${{ steps.get-image-name.outputs.IMAGE_NAME }}:${{ gitea.sha }}"
|
||||
cache-from: type=registry,ref=${{ steps.get-image-name.outputs.IMAGE_NAME }}:${{ gitea.sha }}
|
||||
cache-to: type=inline
|
||||
- name: Build and push Docker image with "latest" tag
|
||||
uses: docker/build-push-action@v5
|
||||
if: gitea.ref == 'refs/heads/main'
|
||||
with:
|
||||
file: Dockerfile.dx
|
||||
push: true
|
||||
tags: "${{ steps.get-image-name.outputs.IMAGE_NAME }}:latest"
|
||||
cache-from: type=registry,ref=${{ steps.get-image-name.outputs.IMAGE_NAME }}:latest
|
||||
cache-to: type=inline
|
||||
|
||||
36
Dockerfile.dx
Normal file
36
Dockerfile.dx
Normal file
@@ -0,0 +1,36 @@
|
||||
FROM gitea/runner-images:ubuntu-latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install a few dependencies
|
||||
RUN set -eux; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
clang \
|
||||
build-essential; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Rustup
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
|
||||
# Include Rust binaries in PATH
|
||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
|
||||
RUN rustup default nightly
|
||||
RUN rustup target add wasm32-unknown-unknown
|
||||
|
||||
# Install dioxus-cli
|
||||
RUN curl -sSL https://dioxus.dev/install.sh | bash
|
||||
|
||||
ENV DAISYUI_PATH=/opt/daisyui/daisyui/
|
||||
ENV DAISYUI_THEME_PATH=/opt/daisyui/theme/
|
||||
|
||||
# Install DaisyUI bundles
|
||||
RUN set -eux; \
|
||||
mkdir -p $DAISYUI_PATH $DAISYUI_THEME_PATH; \
|
||||
cd $DAISYUI_PATH; \
|
||||
curl -sLO https://github.com/saadeghi/daisyui/releases/latest/download/daisyui.js; \
|
||||
cd $DAISYUI_THEME_PATH; \
|
||||
curl -sLO https://github.com/saadeghi/daisyui/releases/latest/download/daisyui-theme.js
|
||||
|
||||
ENV LD_LIBRARY_PATH=/usr/local/lib
|
||||
Reference in New Issue
Block a user