Skip to content

Branch syncing with GitHub workflows

Notifications You must be signed in to change notification settings

orhantoy/branch-syncing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Branch syncing with GitHub workflows 🌟

Example of a 7.x branch that follows a main branch: workflow code

name: Update 7.x ref to main

on:
  push:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/github-script@v2
      with:
        github-token: ${{secrets.GITHUB_TOKEN}}
        script: |
          github.git.updateRef({
            owner: context.repo.owner,
            repo: context.repo.repo,
            ref: 'heads/7.x',
            sha: context.sha,
            force: true
          })

About

Branch syncing with GitHub workflows

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published