Skip to content

frps-onekey

frps-onekey #68

Workflow file for this run

name: frps-onekey
on:
schedule:
- cron: '54 5 * * *'
workflow_dispatch:
repository_dispatch:
types: sync-frps-onekey
jobs:
repo-sync:
env:
PAT: ${{ secrets.PAT }}
runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout the repository
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Check if branch exists
id: check_branch
run: |
if git show-ref --verify --quiet refs/heads/frps-onekey; then
echo "branch_exists=true" >> $GITHUB_ENV
else:
echo "branch_exists=false" >> $GITHUB_ENV
fi
- name: Delete existing branch
if: ${{ env.branch_exists == 'true' }}
run: |
git push origin --delete frps-onekey
- name: Create new branch
if: ${{ env.branch_exists == 'false' }}
run: |
git checkout -b frps-onekey
git push --set-upstream origin frps-onekey
- name: Sync branch
uses: repo-sync/github-sync@v2
if: env.PAT
with:
source_repo: "https://github.com/mvscode/frps-onekey"
source_branch: "master"
destination_branch: "frps-onekey"
github_token: ${{ secrets.PAT }}