Commit 2cf5a016 authored by Li Mi's avatar Li Mi

添加Wings构建

parent 636a58b3
...@@ -5,7 +5,7 @@ on: ...@@ -5,7 +5,7 @@ on:
push: push:
paths: paths:
- "smartdns/**" - "smartdns/**"
- ".github/workflows/smartdnsyml" - ".github/workflows/smartdns.yml"
schedule: schedule:
- cron: "25 7 * * 5" - cron: "25 7 * * 5"
......
name: 定时搬回国内
# 触发条件:在 push 到 master 分支后
on:
schedule:
- cron: "20 12 */3 * *"
env:
TKE_USERNAME: ${{ secrets.TKE_USERNAME }}
TKE_PASSWORD: ${{ secrets.TKE_PASSWORD }}
ACR_USERNAME: ${{ secrets.ACR_USERNAME }}
ACR_PASSWORD: ${{ secrets.ACR_PASSWORD }}
HUB_USERNAME: ${{ secrets.HUB_USERNAME }}
HUB_PASSWORD: ${{ secrets.HUB_PASSWORD }}
# 任务
jobs:
sync-adguard:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v2
- name: 准备同步工具
run: bash ./sync-tool/tools.sh
- name: 搬回国内
run: ./image-syncer -r 5 --auth ./sync-tool/auth.json --images ./adguard/adguard.yml
sync-dnsmasq:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v2
- name: 准备同步工具
run: bash ./sync-tool/tools.sh
- name: 搬回国内
run: ./image-syncer -r 5 --auth ./sync-tool/auth.json --images ./dnsmasq/dnsmasq.yml
sync-l7rsc2:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v2
- name: 准备同步工具
run: bash ./sync-tool/tools.sh
- name: 搬回国内
run: ./image-syncer -r 5 --auth ./sync-tool/auth.json --images ./l7rsc2/l7rsc2.yml
sync-php-fpm:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v2
- name: 准备同步工具
run: bash ./sync-tool/tools.sh
- name: 搬回国内
run: ./image-syncer -r 5 --auth ./sync-tool/auth.json --images ./php-fpm/php-fpm.yml
sync-smartdns:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v2
- name: 准备同步工具
run: bash ./sync-tool/tools.sh
- name: 搬回国内
run: ./image-syncer -r 5 --auth ./sync-tool/auth.json --images ./smartdns/smartdns.yml
# 下面是 P73R0d4c7YL-steam 部分
sync-ark-survival-evolved:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v2
- name: 准备同步工具
run: bash ./sync-tool/tools.sh
- name: 搬回国内
run: ./image-syncer -r 5 --auth ./sync-tool/auth.json --images ./pterodactyl/steam/ark-survival-evolved/ark-survival-evolved.yml
sync-icelakes:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v2
- name: 准备同步工具
run: bash ./sync-tool/tools.sh
- name: 搬回国内
run: ./image-syncer -r 5 --auth ./sync-tool/auth.json --images ./pterodactyl/steam/icelakes/icelakes.yml
sync-mordhau:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v2
- name: 准备同步工具
run: bash ./sync-tool/tools.sh
- name: 搬回国内
run: ./image-syncer -r 5 --auth ./sync-tool/auth.json --images ./pterodactyl/steam/mordhau/mordhau.yml
sync-unturned:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v2
- name: 准备同步工具
run: bash ./sync-tool/tools.sh
- name: 搬回国内
run: ./image-syncer -r 5 --auth ./sync-tool/auth.json --images ./pterodactyl/steam/unturned/unturned.yml
# 下面是 P73R0d4c7YL-base 部分
name: 构建 wings 镜像
# 触发条件:在 push 到 master 分支后
on:
push:
paths:
- "wings/**"
- ".github/workflows/wings.yml"
schedule:
- cron: "25 7 * * 5"
env:
TKE_USERNAME: ${{ secrets.TKE_USERNAME }}
TKE_PASSWORD: ${{ secrets.TKE_PASSWORD }}
ACR_USERNAME: ${{ secrets.ACR_USERNAME }}
ACR_PASSWORD: ${{ secrets.ACR_PASSWORD }}
HUB_USERNAME: ${{ secrets.HUB_USERNAME }}
HUB_PASSWORD: ${{ secrets.HUB_PASSWORD }}
# 任务
jobs:
build-wings:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v2
- name: 构建 wings 镜像
uses: docker/build-push-action@v1
with:
username: ${{ secrets.HUB_USERNAME }}
password: ${{ secrets.HUB_PASSWORD }}
path: ./wings
dockerfile: ./wings/Dockerfile
registry: docker.io
repository: gzzchh/stacks
tags: wings
sync-back:
runs-on: ubuntu-latest
needs:
- build-wings
steps:
- name: 检出代码
uses: actions/checkout@v2
- name: 准备同步工具
run: bash ./sync-tool/tools.sh
- name: 搬回国内
run: ./image-syncer -r 5 --auth ./sync-tool/auth.json --images ./wings/wings.yml
FROM alpine
RUN apk update && \
apk add wget curl unzip tar gzip ca-certificates
RUN curl https://api.github.com/repos/pterodactyl/wings/releases/latest \
| grep browser_download_url \
| grep wings_linux_amd64 \
| cut -d '"' -f 4 \
| wget -i -
RUN chmod +x wings_linux_amd64
# 第二阶段,只有二进制文件
FROM alpine
RUN apk update && \
apk add ca-certificates
COPY --from=0 /wings_linux_amd64 /wings
ENTRYPOINT [ "/wings" ]
gzzchh/stacks:wings: ccr.ccs.tencentyun.com/gzzchh/stacks:wings
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment