mirror of
https://github.com/xiaoqidun/goenv.git
synced 2024-11-21 23:56:45 +08:00
This commit is contained in:
parent
5f65de79bb
commit
ae2335889f
30
.drone.yml
30
.drone.yml
@ -1,19 +1,20 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
name: docker-cn
|
||||
node:
|
||||
region: hk
|
||||
region: cn
|
||||
steps:
|
||||
- name: build
|
||||
pull: if-not-exists
|
||||
image: debian
|
||||
commands:
|
||||
- sed -i "s|deb.debian.org|mirrors.ustc.edu.cn|g" /etc/apt/sources.list.d/debian.sources
|
||||
- apt-get update && apt-get install -y wget unzip && rm -rf /var/lib/apt/lists/*
|
||||
- wget -q -T 180 -4 https://dl.google.com/android/repository/android-ndk-r25c-linux.zip
|
||||
- unzip -q android-ndk-r25c-linux.zip
|
||||
- rm -f android-ndk-r25c-linux.zip
|
||||
- name: docker-cn
|
||||
- wget -q -T 180 -4 https://dl.google.com/android/repository/android-ndk-r26-linux.zip
|
||||
- unzip -q android-ndk-r26-linux.zip
|
||||
- rm -f android-ndk-r26-linux.zip
|
||||
- name: docker
|
||||
pull: if-not-exists
|
||||
image: plugins/docker
|
||||
settings:
|
||||
@ -24,7 +25,22 @@ steps:
|
||||
password:
|
||||
from_secret: docker_password
|
||||
dockerfile: DockerfileCN
|
||||
- name: docker-hk
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: docker-hk
|
||||
node:
|
||||
region: cn
|
||||
steps:
|
||||
- name: build
|
||||
pull: if-not-exists
|
||||
image: debian
|
||||
commands:
|
||||
- apt-get update && apt-get install -y wget unzip && rm -rf /var/lib/apt/lists/*
|
||||
- wget -q -T 180 -4 https://dl.google.com/android/repository/android-ndk-r26-linux.zip
|
||||
- unzip -q android-ndk-r26-linux.zip
|
||||
- rm -f android-ndk-r26-linux.zip
|
||||
- name: docker
|
||||
pull: if-not-exists
|
||||
image: plugins/docker
|
||||
settings:
|
||||
|
@ -4,6 +4,9 @@ FROM golang:1.21.1-bookworm
|
||||
# 作者信息
|
||||
LABEL MAINTAINER="xiaoqidun@gmail.com"
|
||||
|
||||
# 使用中国软件源
|
||||
RUN sed -i "s|deb.debian.org|mirrors.ustc.edu.cn|g" /etc/apt/sources.list.d/debian.sources
|
||||
|
||||
# 安装编译工具链
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
@ -11,9 +14,9 @@ RUN apt-get update \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 安装android ndk
|
||||
COPY android-ndk-r25c /usr/local/android-ndk-r25c
|
||||
COPY android-ndk-r26 /usr/local/android-ndk-r26
|
||||
|
||||
# 环境变量
|
||||
ENV PATH=$PATH:/usr/local/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin
|
||||
ENV PATH=$PATH:/usr/local/android-ndk-r26/toolchains/llvm/prebuilt/linux-x86_64/bin
|
||||
ENV GO111MODULE=on
|
||||
ENV GOPROXY=https://goproxy.cn,direct
|
||||
|
@ -11,9 +11,9 @@ RUN apt-get update \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 安装android ndk
|
||||
COPY android-ndk-r25c /usr/local/android-ndk-r25c
|
||||
COPY android-ndk-r26 /usr/local/android-ndk-r26
|
||||
|
||||
# 环境变量
|
||||
ENV PATH=$PATH:/usr/local/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin
|
||||
ENV PATH=$PATH:/usr/local/android-ndk-r26/toolchains/llvm/prebuilt/linux-x86_64/bin
|
||||
ENV GO111MODULE=on
|
||||
ENV GOPROXY=https://goproxy.aite.xyz,direct
|
||||
|
Loading…
x
Reference in New Issue
Block a user