Files
netlist/.github/workflows/fetch-better-cf-ip.yml
T
2024-01-27 01:25:30 +08:00

48 lines
1.2 KiB
YAML

name: fetch-better-cf-ip
on:
push:
branches:
- 'master'
paths:
- '.github/workflows/fetch-better-cf-ip.yml'
workflow_dispatch:
schedule:
- cron: '0 16 * * *'
jobs:
fetch-better-cf-ip:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check latest release tag
uses: actions/github-script@v7
id: latest_tag
with:
result-encoding: string
retries: 3
script: |
const ret = await github.rest.repos.getLatestRelease({
owner: "XIU2",
repo: "CloudflareSpeedTest"
})
console.log(ret.data.tag_name)
return ret.data.tag_name
- name: Fetch reference branch 1
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: XIU2/CloudflareSpeedTest
version: tags/${{steps.latest_tag.outputs.result}}
regex: true
file: "CloudflareST_*"
target: 'ref1/'
- name: Checkout target branch
uses: actions/checkout@v4
with:
ref: better-cf-ip
path: target
- name: Rebuild target branch
run: |
ls ref1