Skip to content

Push commits into master nixpkgs #6

Push commits into master nixpkgs

Push commits into master nixpkgs #6

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:
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]'
run: |
git config --global user.email "[email protected]"
git config --global user.name "zorrobert"
git fetch --all
git checkout master
echo "add https://github.com/NixOS/nixpkgs.git as upstream"
git remote add upstream https://github.com/NixOS/nixpkgs.git
echo "reset master branch to upstream"
git fetch upstream
git reset --hard upstream/master
echo "merge all branches"
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
echo "force-push all changes to master"
git push --force
echo "done"