Compare commits

...

2 Commits

Author SHA1 Message Date
19cd3c0d68 Merge branch 'automation' of https://git.moon.re/MOOn/Profiles into automation
Some checks failed
Build geosite.dat / build (push) Has started running
Generate RULE-SET for Premium Edition of Clash / build (push) Failing after 8s
2023-05-11 18:33:07 +08:00
a124c2afb2 Generate RULE-SET for Clash 2023-05-11 18:33:00 +08:00
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
name: Generate RULE-SET for Premium Edition of Clash
on:
workflow_dispatch:
schedule:
- cron: "30 22 * * *"
push:
branches:
- automation
paths-ignore:
- "**/README.md"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: https://github.com/actions/checkout@v3
- name: Set variables
run: |
echo "RELEASE_NAME=$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
echo "streaming=https://git.moon.re/MOOn/Profiles/raw/branch/automation/streaming.txt" >> $GITHUB_ENV
shell: bash
- name: Generate streaming.yaml file
run: |
echo "payload:" > Clash/RuleSet/StreamingMedia/streaming.yaml
curl -sSL ${streaming} | awk -F ':' '/^full:/ {printf " - |%s|\n", $2}' | sed "s/|/'/g" >> Clash/RuleSet/StreamingMedia/streaming.yaml
curl -sSL ${streaming} | awk -F ':' '/^domain:/ {printf " - |+.%s|\n", $2}' | sed "s/|/'/g" >> Clash/RuleSet/StreamingMedia/streaming.yaml
- name: Git push
run: |
git config --local user.name "gitea-actions[bot]"
git config --local user.email "gitea-actions[bot]@moon.re"
git add Clash
git commit -m "${{ env.RELEASE_NAME }}"
git push origin automation:main