Skip to content

Rebase upstream

Rebase upstream #29

Workflow file for this run

name: Rebase upstream
on:
workflow_dispatch:
schedule:
- cron: "15 14 * * *"
permissions:
contents: write
jobs:
rebase:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- target: "unstable"

Check failure on line 18 in .github/workflows/rebase.yaml

View workflow run for this annotation

GitHub Actions / Rebase upstream

Invalid workflow file

The workflow is not valid. .github/workflows/rebase.yaml (Line: 18, Col: 9): A sequence was not expected
upstream: "unstable"
- target: "24.05"
upstream: "24.05"
- target: "24.05-backports"
upstream: "24.05"
steps:
- uses: actions/cache@v4
with:
path: .git
key: nixos-${{ matrix.target }}-git-${{ hashFiles('.git/**') }}
restore-keys: |
nixos-${{ matrix.target }}-git-${{ hashFiles('.git/**') }}
nixos-${{ matrix.target }}-git-
- uses: actions/checkout@v4
with:
ref: nixos-${{ matrix.target }}
fetch-depth: 100
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
- name: git setup
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: fetch upstream
run: |
# might already be there if the cache was used
git remote add upstream https://github.com/NixOS/nixpkgs.git || true
git fetch --no-tags --prune --no-recurse-submodules --depth 2000 upstream nixos-${{ matrix.upstream }}
- name: rebase
run: |
git rebase upstream/nixos-${{ matrix.upstream }}
- name: push
run: |
git push --force-with-lease origin nixos-${{ matrix.target }}
- name: collect garbage
run: |
git gc