mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-23 05:40:20 +08:00
ci(mirror): add gitcode mirror
This commit is contained in:
parent
e98e24eba2
commit
54e6602a9d
51
.github/workflows/image.yml
vendored
51
.github/workflows/image.yml
vendored
@ -1,51 +0,0 @@
|
|||||||
# This workflow will build a Java project with Maven
|
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
|
||||||
|
|
||||||
name: PIG 镜像 action
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
task:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
node-version: [18.x]
|
|
||||||
npm-client: [npm]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: pnpm/action-setup@v2
|
|
||||||
if: matrix.npm-client == 'pnpm'
|
|
||||||
name: Install pnpm
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Set up Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: ${{ matrix.npm-client }} install
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: ${{ matrix.npm-client }} run build:docker
|
|
||||||
|
|
||||||
- name: Login to Docker Registry
|
|
||||||
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} registry.cn-hangzhou.aliyuncs.com
|
|
||||||
|
|
||||||
- name: Build and push Docker images
|
|
||||||
run: |
|
|
||||||
docker-compose -f ./docker/docker-compose.yaml build
|
|
||||||
registry="registry.cn-hangzhou.aliyuncs.com/pigx/"
|
|
||||||
for service in $(docker-compose -f ./docker/docker-compose.yaml config --services); do
|
|
||||||
docker tag ${service}:latest ${registry}${service}:latest
|
|
||||||
docker push ${registry}${service}:latest
|
|
||||||
done
|
|
24
.github/workflows/mirror.yml
vendored
24
.github/workflows/mirror.yml
vendored
@ -7,12 +7,32 @@ on:
|
|||||||
branches: [ master,jdk17 ]
|
branches: [ master,jdk17 ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync:
|
gitcode:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: wearerequired/git-mirror-action@master #同步至 gitcode
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
|
||||||
|
with:
|
||||||
|
source-repo: "git@github.com:pig-mesh/pig.git"
|
||||||
|
destination-repo: "git@gitcode.com:pig-mesh/pig-ui.git"
|
||||||
|
gitlink:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: wearerequired/git-mirror-action@master #同步至 gitlink
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
|
||||||
|
with:
|
||||||
|
source-repo: "git@github.com:pig-mesh/pig.git"
|
||||||
|
destination-repo: "git@code.gitlink.org.cn:lengleng/pig-ui.git"
|
||||||
|
gitee:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: "centos:8"
|
||||||
steps:
|
steps:
|
||||||
- uses: wearerequired/git-mirror-action@master #同步至 gitee
|
- uses: wearerequired/git-mirror-action@master #同步至 gitee
|
||||||
env:
|
env:
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
|
||||||
with:
|
with:
|
||||||
source-repo: "git@github.com:pig-mesh/pig-ui.git"
|
source-repo: "git@github.com:pig-mesh/pig.git"
|
||||||
destination-repo: "git@gitee.com:log4j/pig-ui.git"
|
destination-repo: "git@gitee.com:log4j/pig-ui.git"
|
||||||
|
Loading…
Reference in New Issue
Block a user