Skip to content

check token before pushing #5

check token before pushing

check token before pushing #5

name: Mirror subdir to .agents
on:
push:
branches: [main]
# paths:
# - 'common/src/templates/initial-agents-dir/**'
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Push subtree
env:
TOKEN: ${{ secrets.CODEBUFF_GITHUB_TOKEN }}
run: |
if [[ -v TOKEN ]]; then
echo "token exists"
else
echo "token does not exist"
fi
git subtree push --prefix=common/src/templates/initial-agents-dir \
https://${TOKEN}@github.com/codebuffai/codebuff-dot-agents.git \
main