Skip to content

Commit

Permalink
fixup! Mirror master and main
Browse files Browse the repository at this point in the history
The workflow needs to be adjusted so that the just-pushed branch is
cloned (otherwise it is always the default branch that is cloned, even
if in the case that branch is stale).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Jun 18, 2020
1 parent 3c88881 commit a98b073
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/mirror-master-and-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Partial clone
run: git clone --bare --depth=100 --single-branch --filter=blob:none ${{ github.event.repository.html_url }} .
env:
ref: ${{ github.event.ref }}
run: git clone --bare --depth=100 --single-branch --branch ${ref#refs/heads/} --filter=blob:none ${{ github.event.repository.html_url }} .
- name: Push
run: |
git config http.https://github.com/.extraheader "Authorization: Basic $(echo -n x-access-token:${{ github.token }} | base64 --wrap=0)"
Expand Down

0 comments on commit a98b073

Please sign in to comment.