Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
		
			
				
	
	
		
			30 lines
		
	
	
		
			567 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			567 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: update-dev-branch
 | 
						|
 | 
						|
on:
 | 
						|
  push:
 | 
						|
    branches:
 | 
						|
      - main
 | 
						|
    pull_request:
 | 
						|
      paths:
 | 
						|
        - .github/workflows/update-dev-branch.yml
 | 
						|
 | 
						|
permissions:
 | 
						|
  contents: write
 | 
						|
 | 
						|
jobs:
 | 
						|
  update-branch:
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
 | 
						|
    steps:
 | 
						|
      - uses: actions/checkout@v4
 | 
						|
      - shell: bash
 | 
						|
        run: |
 | 
						|
          # checkout our branch
 | 
						|
          git checkout dev || git checkout -b dev
 | 
						|
          # fetch origin
 | 
						|
          git fetch origin
 | 
						|
          # reset to main
 | 
						|
          git reset --hard origin/main
 | 
						|
          # force push it
 | 
						|
          git push -f origin dev
 |