Skip to content

Push commits into master nixpkgs #21

Push commits into master nixpkgs

Push commits into master nixpkgs #21

Workflow file for this run

name: Push commits into master nixpkgs
on:
#push:
#branches-ignore:
# - 'master'
# - 'dev'
workflow_dispatch:
schedule:
- cron: '1 1 * * 6'
permissions:
contents: write
jobs:
# sync-branch:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
#
# - name: Merge syncthing -> master
# uses: devmasx/merge-branch@master
# with:
# type: now
# from_branch: syncthing
# target_branch: master
# github_token: ${{ secrets.GITHUB_TOKEN }}
mergebide:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Merge branches
#git config --global user.email "[email protected]"
#git config --global user.name "zorrobert"
#git config user.name 'zorrobert'
#git config user.email '[email protected]'
#git config --global user.email "[email protected]"
#git config --global user.name "zorrobert"
run: |
echo "run ls"
ls -a
echo "set username and email"
git config --global user.name 'zorrobert'
git config --global user.email "[email protected]"
echo "run git --version"
git --version
echo "run git fetch"
git fetch --all --depth 1
echo "run git checkout master"
git checkout master
echo "add https://github.com/NixOS/nixpkgs.git as upstream"
git remote add upstream https://github.com/NixOS/nixpkgs.git
echo "run git fetch upstream"
git fetch upstream --depth 1
echo "run git reset --hard upstream/master"
git reset --hard upstream/master
echo "merge all branches"
echo "git branch --all | sed 's/ remotes\///g' | sed 's/\/master//g' | sed 's/\/dev//g' | sed 's/\/HEAD//g' | grep "origin/" | xargs -L1 git merge"
git branch --all
echo "force-push all changes to master"
git push --force
echo "done"