Skip to content

add actions

add actions #6

Workflow file for this run

name: Push to GitLab
on: push
jobs:
push_gitlab:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # 确保获取完整的仓库历史
- name: Set up Git
run: |
git config --global user.name "GitHub Action"

Check failure on line 13 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yml

Invalid workflow file

You have an error in your yaml syntax on line 13
git config --global user.email "action@github.com"
- name: Push to GitLab
run: |
git remote add gitlab https://gitlab.com/Elflare/zrlong.git
git fetch gitlab
git push gitlab HEAD:main --force # 强制推送到GitLab的main分支
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} # 使用秘密环境变量