Synchronize upstream #5
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: Synchronize Upstream | |
on: | |
workflow_dispatch: | |
jobs: | |
sync-upstream: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
- uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- uses: DeterminateSystems/flake-checker-action@main | |
- name: Check if sync-upstream branch exists in remote | |
id: check_remote_branch | |
run: | | |
echo "stdout=$(git ls-remote --heads origin sync-upstream)" >> $GITHUB_OUTPUT | |
- name: update dae package | |
run: | | |
git config user.name "daebot" | |
git config user.email "daebot@v2raya.org" | |
git checkout -B sync-upstream | |
nix run nixpkgs#nix-update -- --commit --version=branch --flake dae | |
if [[ "${{ steps.check_remote_branch.outputs.stdout }}" != '' ]]; then | |
git pull origin sync-upstream --rebase | |
fi | |
git push -u origin sync-upstream | |
shell: bash |