mach/.github/workflows/push_subrepos.yml
Stephen Gutekanst 1ef3add01d CI: strip extra headers when pushing to subrepos (prevents auth)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-02-12 19:00:10 -07:00

20 lines
650 B
YAML

name: Push to subrepositories
on:
push:
branches:
- 'main'
jobs:
push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- 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