mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-06-28 08:17:30 +08:00
docker build
This commit is contained in:
parent
30806bfdcf
commit
b34320350d
34
.github/workflows/build.yml
vendored
Normal file
34
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: EstablishDockerImage
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_FQDN: registry.cn-hangzhou.aliyuncs.com/playedu/api
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login to GHCR
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: registry.cn-hangzhou.aliyuncs.com
|
||||||
|
username: ${{ secrets.ALI_REGISTRY_EMAIL }}
|
||||||
|
password: ${{ secrets.ALI_REGISTRY_PASS }}
|
||||||
|
- name: Build
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ env.IMAGE_FQDN }}:1.3
|
@ -1,11 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
echo '设置M2_HOME...'
|
|
||||||
|
|
||||||
cp -r docker/.m2 /root
|
|
||||||
|
|
||||||
ls /root/.m2
|
|
||||||
|
|
||||||
echo '开始打包...'
|
echo '开始打包...'
|
||||||
|
|
||||||
export MAVEN_OPTS=-Dmaven.test.skip=true
|
export MAVEN_OPTS=-Dmaven.test.skip=true
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
|
|
||||||
<mirrors>
|
|
||||||
<mirror>
|
|
||||||
<id>Ali</id>
|
|
||||||
<name>Ali Maven</name>
|
|
||||||
<mirrorOf>*</mirrorOf>
|
|
||||||
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
|
|
||||||
</mirror>
|
|
||||||
</mirrors>
|
|
||||||
</settings>
|
|
Loading…
x
Reference in New Issue
Block a user