Skip to content

Commit

Permalink
ci: Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
akirak committed Nov 3, 2023
1 parent 1b22aa9 commit 7815a67
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/merge-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,29 @@ jobs:
push:
runs-on: ubuntu-latest

strategy:
matrix:
- base_ref: akirak
upstream: 'https://github.com/melpa/melpa.git'
upstream_branch: 'master'

steps:

- uses: actions/checkout@v3
with:
fetch-depth: 0
sparse-checkout: '.'
ref: akirak
ref: ${{ strategy.base_ref }}

- name: Switch to a work branch
id: start
run: |
echo "rev=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Fetch the upstream
id: upstream
run: |
git remote add upstream https://github.com/melpa/melpa.git
git fetch upstream master
echo "ref=upstream/master" >> "$GITHUB_OUTPUT"
git remote add upstream ${{ matrix.upstream }}
git fetch upstream ${{ matrix.upstream_branch }}
- uses: DeterminateSystems/nix-installer-action@v4
with:
Expand All @@ -43,12 +47,12 @@ jobs:
- name: Retrieve the merge base
id: merge-base
run: |
rev=$(git merge-base ${{ steps.upstream.outputs.ref }} ${{ steps.start.outputs.rev }})
rev=$(git merge-base upstream/${{ matrix.upstream_branch }} ${{ strategy.base_ref }})
echo "rev=$rev" > "$GITHUB_OUTPUT"
- name: Filter commits
run: |
git switch -C upstream-recipes ${{ steps.upstream.outputs.ref }}
git switch -C upstream-recipes upstream/${{ matrix.upstream_branch }}
nix run nixpkgs#git-filter-repo -- \
--path recipes/ --refs "${{ steps.merge-base.outputs.rev }}..HEAD" \
--commit-callback '
Expand Down

0 comments on commit 7815a67

Please sign in to comment.