mirror of
https://github.com/xiaoqidun/goenv.git
synced 2025-11-26 16:41:02 +08:00
feat(构建脚本): 尝试迁移构建脚本
This commit is contained in:
37
.drone.yml
37
.drone.yml
@@ -1,37 +0,0 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: default
|
|
||||||
node:
|
|
||||||
region: cn
|
|
||||||
steps:
|
|
||||||
- name: build
|
|
||||||
pull: if-not-exists
|
|
||||||
image: debian:trixie
|
|
||||||
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-r29-linux.zip
|
|
||||||
- unzip -q android-ndk-r29-linux.zip
|
|
||||||
- rm -f android-ndk-r29-linux.zip
|
|
||||||
- name: docker-cn
|
|
||||||
pull: if-not-exists
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
repo: ccr.ccs.tencentyun.com/xiaoqidun/goenv
|
|
||||||
registry: ccr.ccs.tencentyun.com
|
|
||||||
username:
|
|
||||||
from_secret: docker_username
|
|
||||||
password:
|
|
||||||
from_secret: docker_password
|
|
||||||
dockerfile: DockerfileCN
|
|
||||||
- name: docker-hk
|
|
||||||
pull: if-not-exists
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
repo: hkccr.ccs.tencentyun.com/xiaoqidun/goenv
|
|
||||||
registry: hkccr.ccs.tencentyun.com
|
|
||||||
username:
|
|
||||||
from_secret: docker_username
|
|
||||||
password:
|
|
||||||
from_secret: docker_password
|
|
||||||
dockerfile: DockerfileHK
|
|
||||||
39
.gitea/workflows/build.yaml
Normal file
39
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
name: default
|
||||||
|
on: [push, workflow_dispatch]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: cn
|
||||||
|
container: debian:trixie
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- dockerfile: DockerfileCN
|
||||||
|
registry: ccr.ccs.tencentyun.com
|
||||||
|
image: ccr.ccs.tencentyun.com/xiaoqidun/goenv:latest
|
||||||
|
- dockerfile: DockerfileHK
|
||||||
|
registry: hkccr.ccs.tencentyun.com
|
||||||
|
image: hkccr.ccs.tencentyun.com/xiaoqidun/goenv:latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- run: |
|
||||||
|
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-r29-linux.zip
|
||||||
|
unzip -q android-ndk-r29-linux.zip && rm -f android-ndk-r29-linux.zip
|
||||||
|
- uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
driver-opts: |
|
||||||
|
"env.http_proxy=${{ env.HTTP_PROXY }}"
|
||||||
|
"env.https_proxy=${{ env.HTTPS_PROXY }}"
|
||||||
|
"env.no_proxy=${{ env.NO_PROXY }}"
|
||||||
|
- uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ matrix.registry }}
|
||||||
|
username: ${{ secrets.docker_username }}
|
||||||
|
password: ${{ secrets.docker_password }}
|
||||||
|
- uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ${{ matrix.dockerfile }}
|
||||||
|
push: true
|
||||||
|
tags: ${{ matrix.image }}
|
||||||
|
provenance: false
|
||||||
Reference in New Issue
Block a user