Skip to content

Create sync-featrue-code.yaml #1

Create sync-featrue-code.yaml

Create sync-featrue-code.yaml #1

name: Sync Feature Branch to Main
on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight
workflow_dispatch: # Manual trigger
jobs:
sync-feature:
runs-on: self-runner-kubesphere
steps:
- name: Checkout master branch
uses: actions/checkout@v3
with:
ref: master
- name: Checkout feature branch
uses: actions/checkout@v3
with:
ref: feature
path: feature-branch
- name: Remove old feature directory
run: rm -rf feature
- name: Sync feature branch to master/feature directory
run: |
mkdir -p feature
cp -r feature-branch/* feature/
git config --global user.name 'ks-ci-bot'
git config --global user.email 'ci-bot@kubesphere.io'
git add feature/
git commit -m "Sync feature branch to master/feature directory"
- name: Push changes and create PR
uses: peter-evans/create-pull-request@v4
with:

Check failure on line 38 in .github/workflows/sync-featrue-code.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/sync-featrue-code.yaml

Invalid workflow file

You have an error in your yaml syntax on line 38
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Sync feature branch to master/feature directory
branch: sync-feature-to-main
title: [ci-bot] Sync feature branch to master/feature directory
body: This PR syncs the feature branch to the master/feature directory.