anti-AD/.github/workflows/download-upstream.yml

33 lines
1.1 KiB
YAML
Raw Normal View History

2021-05-29 11:22:18 +08:00
# This is a basic workflow to help you get started with Actions
2021-05-29 11:34:40 +08:00
name: download upstream
2021-05-29 11:22:18 +08:00
on:
workflow_dispatch:
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2024-02-03 14:54:04 +08:00
- uses: actions/checkout@v4.1.1
2021-05-29 11:22:18 +08:00
- name: prepare upstream list
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action[bot]"
/bin/bash ./scripts/prepare-upstream.sh
git add *
git commit -am "download upstream."
- name: push
uses: ad-m/github-push-action@master
with:
2021-05-29 11:42:41 +08:00
branch: 'adlist-maker'
2021-05-29 11:22:18 +08:00
github_token: ${{ secrets.PERSON_TOKEN }}
2021-05-29 11:44:20 +08:00
- name: rebuild list
2021-05-29 11:22:18 +08:00
run: |
curl -s -m 30 -X POST "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/workflows/auto-rebuild.yml/dispatches" -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ secrets.PERSON_TOKEN }}" -d '{"ref":"adlist-maker"}'