mach/.github/workflows/push_subrepos.yml
Stephen Gutekanst 71573e7033 CI: correctly fetch full Git history for subrepo push
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-02-12 19:16:41 -07:00

24 lines
815 B
YAML

name: Push to subrepositories
on:
push:
branches:
- 'main'
jobs:
push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# fetch full Git history, otherwise push-subrepos.sh would fail due to not being able to
# split the git subtree.
fetch-depth: 0
- name: 'Push recent commits to subrepositories'
env:
ACCESS_TOKEN: ${{ secrets.HEXOPS_MACH_PUSH_SUBREPOS }}
run: |
git config user.name 'Repository synchronization automation'
git config user.email 'stephen@hexops.com'
# See https://github.community/t/automating-push-to-public-repo/17742/12
git config -l | grep 'http\..*\.extraheader' | cut -d= -f1 | xargs -L1 git config --unset-all
./dev/push-subrepos.sh