Files
license-manager/.github/workflows/sync_to_enterprise.yml
T

39 lines
1.1 KiB
YAML

name: Sync to Enterprise
on:
push:
branches:
- main
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Add enterprise remote
run: |
echo "Token loaded: ${{ secrets.ENTERPRISE_REPO_TOKEN != '' }}"
TOKEN="${{ secrets.ENTERPRISE_REPO_TOKEN }}"
echo "Token first 4 chars: ${TOKEN:0:4}"
git remote add enterprise https://x-access-token:${{ secrets.ENTERPRISE_REPO_TOKEN }}@github.com/cedar-v/license-manager-enterprise.git
- name: Test remote connection
run: |
echo "=== Testing remote connection ==="
git ls-remote enterprise
echo "=== Test complete ==="
- name: Push to enterprise license-manager branch
run: |
git push enterprise main:license-manager --force