Run sync workflows for both homepage VPS hosts
This commit is contained in:
parent
fb36e17706
commit
f2dd39bcf2
25
.github/workflows/sync-blackbox-exporter.yml
vendored
25
.github/workflows/sync-blackbox-exporter.yml
vendored
@ -14,14 +14,19 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
prep:
|
||||
name: Resolve latest tag & remote check
|
||||
name: Resolve latest tag & remote check (${{ matrix.vps_host }})
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
vps_host:
|
||||
- cn-homepage.svc.plus
|
||||
- global-homepage.svc.plus
|
||||
env:
|
||||
GH_REPO: prometheus/blackbox_exporter
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
RSYNC_SSH_USER: ${{ secrets.RSYNC_SSH_USER }}
|
||||
VPS_HOST: ${{ secrets.VPS_HOST }}
|
||||
VPS_HOST: ${{ matrix.vps_host }}
|
||||
REMOTE_ROOT: /data/update-server/prometheus/blackbox_exporter
|
||||
outputs:
|
||||
tag: ${{ steps.latest.outputs.tag }}
|
||||
@ -74,13 +79,16 @@ jobs:
|
||||
fi
|
||||
|
||||
sync-one:
|
||||
name: Sync ${{ matrix.asset_suffix }} for ${{ needs.prep.outputs.version }}
|
||||
name: Sync ${{ matrix.asset_suffix }} for ${{ needs.prep.outputs.version }} (${{ matrix.vps_host }})
|
||||
needs: prep
|
||||
if: needs.prep.outputs.exists == 'false'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
vps_host:
|
||||
- cn-homepage.svc.plus
|
||||
- global-homepage.svc.plus
|
||||
asset_suffix:
|
||||
- "linux-amd64.tar.gz"
|
||||
- "linux-arm64.tar.gz"
|
||||
@ -91,7 +99,7 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
RSYNC_SSH_USER: ${{ secrets.RSYNC_SSH_USER }}
|
||||
VPS_HOST: ${{ secrets.VPS_HOST }}
|
||||
VPS_HOST: ${{ matrix.vps_host }}
|
||||
REMOTE_ROOT: /data/update-server/prometheus/blackbox_exporter
|
||||
TAG: ${{ needs.prep.outputs.tag }}
|
||||
VERSION: ${{ needs.prep.outputs.version }}
|
||||
@ -150,14 +158,19 @@ jobs:
|
||||
"releases/${VERSION}/${{ steps.has_asset.outputs.asset }}" "${RSYNC_SSH_USER}@${VPS_HOST}:${REMOTE_DIR}/"
|
||||
|
||||
retention:
|
||||
name: Remote retention (keep latest 10 v0.*)
|
||||
name: Remote retention (keep latest 10 v0.*) (${{ matrix.vps_host }})
|
||||
needs: [prep, sync-one]
|
||||
if: needs.prep.outputs.exists == 'false'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
vps_host:
|
||||
- cn-homepage.svc.plus
|
||||
- global-homepage.svc.plus
|
||||
env:
|
||||
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
RSYNC_SSH_USER: ${{ secrets.RSYNC_SSH_USER }}
|
||||
VPS_HOST: ${{ secrets.VPS_HOST }}
|
||||
VPS_HOST: ${{ matrix.vps_host }}
|
||||
REMOTE_ROOT: /data/update-server/prometheus/blackbox_exporter
|
||||
steps:
|
||||
- name: Init SSH
|
||||
|
||||
25
.github/workflows/sync-node-exporter.yml
vendored
25
.github/workflows/sync-node-exporter.yml
vendored
@ -19,14 +19,19 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
prep:
|
||||
name: Resolve version & remote check
|
||||
name: Resolve version & remote check (${{ matrix.vps_host }})
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
vps_host:
|
||||
- cn-homepage.svc.plus
|
||||
- global-homepage.svc.plus
|
||||
env:
|
||||
GH_REPO: prometheus/node_exporter
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
RSYNC_SSH_USER: ${{ secrets.RSYNC_SSH_USER }}
|
||||
VPS_HOST: ${{ secrets.VPS_HOST }}
|
||||
VPS_HOST: ${{ matrix.vps_host }}
|
||||
REMOTE_ROOT: /data/update-server/otel/node_exporter/
|
||||
DEFAULT_TAG: 1.9.1 # <-- 无 v
|
||||
ALLOWED_SERIES: "^(1\\.9|1\\.8)\\.[0-9]+\\.[0-9]+$"
|
||||
@ -91,13 +96,16 @@ jobs:
|
||||
fi
|
||||
|
||||
sync-one:
|
||||
name: Sync ${{ matrix.asset_suffix }} for ${{ needs.prep.outputs.version }}
|
||||
name: Sync ${{ matrix.asset_suffix }} for ${{ needs.prep.outputs.version }} (${{ matrix.vps_host }})
|
||||
needs: prep
|
||||
if: needs.prep.outputs.exists == 'false'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
vps_host:
|
||||
- cn-homepage.svc.plus
|
||||
- global-homepage.svc.plus
|
||||
asset_suffix:
|
||||
- "linux-amd64.tar.gz"
|
||||
- "linux-arm64.tar.gz"
|
||||
@ -106,7 +114,7 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
RSYNC_SSH_USER: ${{ secrets.RSYNC_SSH_USER }}
|
||||
VPS_HOST: ${{ secrets.VPS_HOST }}
|
||||
VPS_HOST: ${{ matrix.vps_host }}
|
||||
REMOTE_ROOT: /data/update-server/prometheus/node_exporter
|
||||
TAG: ${{ needs.prep.outputs.tag }} # v1.9.1
|
||||
VERSION: ${{ needs.prep.outputs.version }} # 1.9.1
|
||||
@ -166,14 +174,19 @@ jobs:
|
||||
"releases/${VERSION}/${{ steps.has_asset.outputs.asset }}" "${RSYNC_SSH_USER}@${VPS_HOST}:${REMOTE_DIR}/"
|
||||
|
||||
retention:
|
||||
name: Remote retention (keep latest 10)
|
||||
name: Remote retention (keep latest 10) (${{ matrix.vps_host }})
|
||||
needs: [prep, sync-one]
|
||||
if: needs.prep.outputs.exists == 'false'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
vps_host:
|
||||
- cn-homepage.svc.plus
|
||||
- global-homepage.svc.plus
|
||||
env:
|
||||
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
RSYNC_SSH_USER: ${{ secrets.RSYNC_SSH_USER }}
|
||||
VPS_HOST: ${{ secrets.VPS_HOST }}
|
||||
VPS_HOST: ${{ matrix.vps_host }}
|
||||
REMOTE_ROOT: /data/update-server/prometheus/node_exporter/
|
||||
steps:
|
||||
- name: Init SSH
|
||||
|
||||
42
.github/workflows/sync-otel-collector.yml
vendored
42
.github/workflows/sync-otel-collector.yml
vendored
@ -20,14 +20,19 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
prep:
|
||||
name: Resolve tag & remote check
|
||||
name: Resolve tag & remote check (${{ matrix.vps_host }})
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
vps_host:
|
||||
- cn-homepage.svc.plus
|
||||
- global-homepage.svc.plus
|
||||
env:
|
||||
GH_REPO: open-telemetry/opentelemetry-collector-releases
|
||||
GH_TOKEN: ${{ github.token }} # 用内置 token,无需自建 PAT
|
||||
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
RSYNC_SSH_USER: ${{ secrets.RSYNC_SSH_USER }}
|
||||
VPS_HOST: ${{ secrets.VPS_HOST }}
|
||||
VPS_HOST: ${{ matrix.vps_host }}
|
||||
REMOTE_ROOT: /data/update-server/otel/OpenTelemetry/
|
||||
outputs:
|
||||
tag: ${{ steps.resolve.outputs.tag }}
|
||||
@ -91,24 +96,36 @@ jobs:
|
||||
fi
|
||||
|
||||
sync-one:
|
||||
name: Sync ${{ matrix.asset_prefix }}_${{ matrix.asset_suffix }} for ${{ needs.prep.outputs.tag }}
|
||||
name: Sync ${{ matrix.asset_prefix }}_${{ matrix.asset_suffix }} for ${{ needs.prep.outputs.tag }} (${{ matrix.vps_host }})
|
||||
needs: prep
|
||||
if: needs.prep.outputs.exists == 'false' # 远端已存在则整个矩阵跳过
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
vps_host:
|
||||
- cn-homepage.svc.plus
|
||||
- global-homepage.svc.plus
|
||||
asset:
|
||||
- otelcol-contrib_linux_amd64
|
||||
- otelcol-contrib_linux_arm64
|
||||
- opampsupervisor_linux_amd64
|
||||
- opampsupervisor_linux_arm64
|
||||
include:
|
||||
- asset_prefix: "otelcol-contrib"
|
||||
- asset: otelcol-contrib_linux_amd64
|
||||
asset_prefix: "otelcol-contrib"
|
||||
asset_suffix: "linux_amd64.tar.gz"
|
||||
release_tag_prefix: ""
|
||||
- asset_prefix: "otelcol-contrib"
|
||||
- asset: otelcol-contrib_linux_arm64
|
||||
asset_prefix: "otelcol-contrib"
|
||||
asset_suffix: "linux_arm64.tar.gz"
|
||||
release_tag_prefix: ""
|
||||
- asset_prefix: "opampsupervisor"
|
||||
- asset: opampsupervisor_linux_amd64
|
||||
asset_prefix: "opampsupervisor"
|
||||
asset_suffix: "linux_amd64"
|
||||
release_tag_prefix: "cmd/opampsupervisor/"
|
||||
- asset_prefix: "opampsupervisor"
|
||||
- asset: opampsupervisor_linux_arm64
|
||||
asset_prefix: "opampsupervisor"
|
||||
asset_suffix: "linux_arm64"
|
||||
release_tag_prefix: "cmd/opampsupervisor/"
|
||||
env:
|
||||
@ -116,7 +133,7 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }} # 继续使用内置 token
|
||||
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
RSYNC_SSH_USER: ${{ secrets.RSYNC_SSH_USER }}
|
||||
VPS_HOST: ${{ secrets.VPS_HOST }}
|
||||
VPS_HOST: ${{ matrix.vps_host }}
|
||||
REMOTE_ROOT: /data/update-server/otel/OpenTelemetry
|
||||
TAG: ${{ needs.prep.outputs.tag }}
|
||||
VERSION: ${{ needs.prep.outputs.version }}
|
||||
@ -177,14 +194,19 @@ jobs:
|
||||
"releases/${TAG}/${{ steps.has_asset.outputs.asset }}" "${RSYNC_SSH_USER}@${VPS_HOST}:${REMOTE_DIR}/"
|
||||
|
||||
retention:
|
||||
name: Remote retention (keep latest 10 v0.*)
|
||||
name: Remote retention (keep latest 10 v0.*) (${{ matrix.vps_host }})
|
||||
needs: [prep, sync-one]
|
||||
if: needs.prep.outputs.exists == 'false' # 只有新增版本时才清理
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
vps_host:
|
||||
- cn-homepage.svc.plus
|
||||
- global-homepage.svc.plus
|
||||
env:
|
||||
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
RSYNC_SSH_USER: ${{ secrets.RSYNC_SSH_USER }}
|
||||
VPS_HOST: ${{ secrets.VPS_HOST }}
|
||||
VPS_HOST: ${{ matrix.vps_host }}
|
||||
REMOTE_ROOT: /data/update-server/otel/OpenTelemetry/
|
||||
steps:
|
||||
- name: Init SSH
|
||||
|
||||
25
.github/workflows/sync-xray-core.yml
vendored
25
.github/workflows/sync-xray-core.yml
vendored
@ -15,14 +15,19 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
prep:
|
||||
name: Resolve latest tag & remote check
|
||||
name: Resolve latest tag & remote check (${{ matrix.vps_host }})
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
vps_host:
|
||||
- cn-homepage.svc.plus
|
||||
- global-homepage.svc.plus
|
||||
env:
|
||||
GH_REPO: XTLS/Xray-core
|
||||
GH_TOKEN: ${{ github.token }} # 用内置 token,无需自建 PAT
|
||||
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
RSYNC_SSH_USER: ${{ secrets.RSYNC_SSH_USER }}
|
||||
VPS_HOST: ${{ secrets.VPS_HOST }}
|
||||
VPS_HOST: ${{ matrix.vps_host }}
|
||||
REMOTE_ROOT: /data/update-server/xray-core
|
||||
outputs:
|
||||
tag: ${{ steps.latest.outputs.tag }}
|
||||
@ -70,20 +75,23 @@ jobs:
|
||||
fi
|
||||
|
||||
sync-one:
|
||||
name: Sync ${{ matrix.asset }} for ${{ needs.prep.outputs.tag }}
|
||||
name: Sync ${{ matrix.asset }} for ${{ needs.prep.outputs.tag }} (${{ matrix.vps_host }})
|
||||
needs: prep
|
||||
if: needs.prep.outputs.exists == 'false' # 远端已存在则整个矩阵跳过
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
vps_host:
|
||||
- cn-homepage.svc.plus
|
||||
- global-homepage.svc.plus
|
||||
asset: [ "Xray-linux-64.zip", "Xray-macos-64.zip", "Xray-windows-64.zip" ]
|
||||
env:
|
||||
GH_REPO: XTLS/Xray-core
|
||||
GH_TOKEN: ${{ github.token }} # 继续使用内置 token
|
||||
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
RSYNC_SSH_USER: ${{ secrets.RSYNC_SSH_USER }}
|
||||
VPS_HOST: ${{ secrets.VPS_HOST }}
|
||||
VPS_HOST: ${{ matrix.vps_host }}
|
||||
REMOTE_ROOT: /data/update-server/xray-core
|
||||
TAG: ${{ needs.prep.outputs.tag }}
|
||||
steps:
|
||||
@ -140,14 +148,19 @@ jobs:
|
||||
"releases/${TAG}/${{ matrix.asset }}" "${RSYNC_SSH_USER}@${VPS_HOST}:${REMOTE_DIR}/"
|
||||
|
||||
retention:
|
||||
name: Remote retention (keep latest 10 v25.*)
|
||||
name: Remote retention (keep latest 10 v25.*) (${{ matrix.vps_host }})
|
||||
needs: [prep, sync-one]
|
||||
if: needs.prep.outputs.exists == 'false' # 只有新增版本时才清理
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
vps_host:
|
||||
- cn-homepage.svc.plus
|
||||
- global-homepage.svc.plus
|
||||
env:
|
||||
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
RSYNC_SSH_USER: ${{ secrets.RSYNC_SSH_USER }}
|
||||
VPS_HOST: ${{ secrets.VPS_HOST }}
|
||||
VPS_HOST: ${{ matrix.vps_host }}
|
||||
REMOTE_ROOT: /data/update-server/xray-core
|
||||
steps:
|
||||
- name: Init SSH
|
||||
|
||||
Loading…
Reference in New Issue
Block a user