Fixing Provider Initialization Error in Pulumi Cloudflare #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync to GitLab | |
on: | |
push: | |
branches: | |
- main # Sync only when there are changes to the main branch | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Check out the GitHub repository | |
- name: Check out source repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Fetch the entire history to avoid shallow clone issues | |
# Step 2: Add GitLab as a remote and push changes | |
- name: Sync to GitLab | |
env: | |
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | |
GITLAB_USERNAME: ${{ secrets.GITLAB_USERNAME }} | |
GITLAB_EMAIL: ${{ secrets.GITLAB_EMAIL }} | |
GITLAB_URL: ${{ secrets.GITLAB_URL }} | |
run: | | |
# Configure Git user | |
git config --global user.name "${GITLAB_USERNAME}" | |
git config --global user.email "${GITLAB_EMAIL}" | |
# Add GitLab as a remote | |
git remote add gitlab https://oauth2:${GITLAB_TOKEN}@${GITLAB_URL} || true | |
# Push to GitLab (force to ensure sync) | |
# git push --force gitlab main | |
# git push gitlab main:sync-main | |
git push gitlab main |