diff --git a/.github/COPY_STATIC.yml b/.github/COPY_STATIC.yml new file mode 100644 index 00000000..f8d1ce59 --- /dev/null +++ b/.github/COPY_STATIC.yml @@ -0,0 +1,38 @@ +name: COPY STATIC + +on: + push: + branches: + - 'master' + - 'develop' + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + workflow_dispatch: + +jobs: + to_gitlab: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: pixta-dev/repository-mirroring-action@v1 + with: + target_repo_url: + git@gitlab.com:whyour/qinglong-static.git + ssh_private_key: + ${{ secrets.GITLAB_SSH_PK }} + + to_gitee: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: pixta-dev/repository-mirroring-action@v1 + with: + target_repo_url: + git@gitee.com:whyour/qinglong-static.git + ssh_private_key: + ${{ secrets.GITLAB_SSH_PK }} \ No newline at end of file diff --git a/.github/workflows/build_docker_image.yml b/.github/workflows/build_docker_image.yml index 6dc9cb68..43273b23 100644 --- a/.github/workflows/build_docker_image.yml +++ b/.github/workflows/build_docker_image.yml @@ -62,8 +62,10 @@ jobs: GITHUB_BRANCH: ${{ github.ref_name }} run: | mkdir -p tmp + mkdir -p .github/workflows cd ./tmp cp -rf ../static/* ./ + cp ../.github/COPY_STATIC.yml ./.github/workflows/ git init -b ${GITHUB_BRANCH} && git add . git config --local user.name 'github-actions[bot]' git config --local user.email 'github-actions[bot]@users.noreply.github.com'