From ec02479ccf40b60e97fa946e23f7f9e3fa541432 Mon Sep 17 00:00:00 2001 From: Thalia Archibald Date: Thu, 20 Jun 2024 21:44:12 -0700 Subject: Automatically linearize chapter history --- .github/workflows/linearize.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/linearize.yml (limited to '.github/workflows/linearize.yml') diff --git a/.github/workflows/linearize.yml b/.github/workflows/linearize.yml new file mode 100644 index 00000000..4b1828d3 --- /dev/null +++ b/.github/workflows/linearize.yml @@ -0,0 +1,25 @@ +name: Linearize chapter history + +on: + push: + branches: + - main + +jobs: + linearize: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 0 # Fetch the full history + - name: Construct linear history and push to linear branch + run: | + git config user.name 'GitHub Action' + git config user.email 'actions@github.com' + .github/workflows/linearize.sh + git remote add linear ./linear + git fetch linear + git checkout -b linear linear/main + git remote remove linear + git push -f origin linear -- cgit v1.2.3