Push commits into master nixpkgs #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |