Skip to content

Commit

Permalink
Update mirror.yml (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbtools authored Jan 19, 2025
1 parent 7c713d3 commit 4392574
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ name: Mirror
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
- cron: '5 0 * * 0'

permissions:
pull-requests: write
contents: write

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -21,8 +24,20 @@ jobs:
npm install
npm run mirror
git status
- name: Open PR
uses: peter-evans/create-pull-request@v5
- name: Open Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: Automatic Update
labels: automerge
- name: Auto Approve
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr review --approve "${{ steps.cpr.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Automerge Pull Request
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr merge --merge --auto "1"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 4392574

Please sign in to comment.