28 lines
974 B
YAML
28 lines
974 B
YAML
name: Push to subrepositories
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
path:
|
|
- "libs/**"
|
|
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: Install git-filter-repo
|
|
run: python3 -m pip install --user git-filter-repo
|
|
- 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
|
|
./.github/push-subrepos.sh
|