项目初始化
初步实现开始测试
This commit is contained in:
commit
a7d5a51778
42
.gitea/workflows/build.yml
Normal file
42
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,42 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build-rust:
|
||||
runs-on: walker-local
|
||||
steps:
|
||||
- name: 检出代码
|
||||
uses: https://gitea.joylink.club/actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: 设置 Docker
|
||||
uses: https://gitea.joylink.club/actions/local-setup-docker-cli-action@v0.1.1
|
||||
- name: 设置 Docker Buildx
|
||||
uses: https://gitea.joylink.club/actions/local-setup-buildx-action@v0.1.3
|
||||
- name: docker登录gitea.joylink.club
|
||||
uses: https://gitea.joylink.club/docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.joylink.club
|
||||
username: shengxuqiang
|
||||
password: ${{ secrets.SHENGXUQIANG_PASSWORD }}
|
||||
- name: Docker Build and push
|
||||
uses: https://gitea.joylink.club/docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
gitea.joylink.club/act/rust:bullseye
|
||||
- name: 本地测试环境pull
|
||||
uses: https://gitea.joylink.club/appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ secrets.LOCAL_233_SSH_HOST }}
|
||||
port: ${{ secrets.LOCAL_233_SSH_PORT }}
|
||||
username: ${{ secrets.LOCAL_233_SSH_USER }}
|
||||
password: ${{ secrets.LOCAL_233_SSH_PASSWORD }}
|
||||
script: |
|
||||
docker pull gitea.joylink.club/act/rust:bullseye
|
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
# 以 node:16-bullseye 镜像为基础,添加openssl、musl-tools、Rust 工具链等工具
|
||||
# 用于构建 Rust 项目的镜像
|
||||
FROM node:16-bullseye
|
||||
|
||||
RUN apt-get update && apt-get install -y openssl musl-tools && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
RUN rustup target add x86_64-unknown-linux-musl
|
||||
|
||||
CMD [ "bash" ]
|
Loading…
Reference in New Issue
Block a user