Compare commits
33 Commits
v3.7.4
...
v4.0.9-nat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27c3ab7b82 | ||
|
|
67ce2b5c86 | ||
|
|
be67a8fef0 | ||
|
|
6b47cfd5f8 | ||
|
|
d5ab5e6727 | ||
|
|
adcf60eeb6 | ||
|
|
5b20c46c5d | ||
|
|
472edfaabd | ||
|
|
e8ac7f9fbc | ||
|
|
cb418d8acd | ||
|
|
d4d6064bcd | ||
|
|
297ce02549 | ||
|
|
4f7cfe396a | ||
|
|
521ac4d3f6 | ||
|
|
095245b421 | ||
|
|
af390af277 | ||
|
|
3e55783c5f | ||
|
|
b2fba3cac7 | ||
|
|
26f6647a4d | ||
|
|
84b6f139b9 | ||
|
|
5e865ab425 | ||
|
|
6b4c1b6676 | ||
|
|
ff654bb606 | ||
|
|
8eaa9fd792 | ||
|
|
c7af2dd52c | ||
|
|
373b497d37 | ||
|
|
6d1dc22670 | ||
|
|
52e4616bb3 | ||
|
|
79fba8746f | ||
|
|
80122ebe57 | ||
|
|
148672031f | ||
|
|
fdcc48178f | ||
|
|
1f9029baf1 |
@@ -21,34 +21,40 @@ env:
|
|||||||
# 构建 Job
|
# 构建 Job
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-node24 # 如果host构建 :linux_amd64
|
runs-on: ubuntu-node22 # 如果host构建:linux_amd64
|
||||||
# container:
|
# container:
|
||||||
# image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/ghcr.io/catthehacker/ubuntu:act-latest
|
# image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Print system info 1
|
- name: Print system info 1
|
||||||
run: echo " The job was automatically triggered by a ${{ gitea.event_name }} event."
|
run: echo " The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||||
|
|
||||||
- name: Print system info 2
|
- name: Print system info 2
|
||||||
run: echo " This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
run: echo " This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||||
|
|
||||||
- name: Print system info 3
|
- name: Print system info 3
|
||||||
run: echo " The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
run: echo " The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||||
|
|
||||||
- name: Print env
|
- name: Print env
|
||||||
run: env
|
run: env && blkid
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: apt-get update &&
|
run: |
|
||||||
|
apt-get update &&
|
||||||
apt-get install -y gettext &&
|
apt-get install -y gettext &&
|
||||||
apt-get install -y maven &&
|
apt-get install -y maven &&
|
||||||
apt-get install -y docker.io &&
|
apt-get install -y sudo &&
|
||||||
apt-get update &&
|
apt-get install -y iptables &&
|
||||||
apt-get install ca-certificates curl &&
|
|
||||||
install -m 0755 -d /etc/apt/keyrings &&
|
- name: Set up Docker
|
||||||
curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc &&
|
uses: http://139.9.216.111:3000/bamanker/setup-docker-action@v4
|
||||||
chmod a+r /etc/apt/keyrings/docker.asc &&
|
with:
|
||||||
echo \
|
version: type=archive,channel=stable,version=v27.4.0
|
||||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu \
|
daemon-config: |
|
||||||
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
|
{
|
||||||
tee /etc/apt/sources.list.d/docker.list > /dev/null &&
|
"registry-mirrors":["https://docker.1ms.run"],
|
||||||
apt-get update &&
|
"dns": ["8.8.8.8", "114.114.114.114"]
|
||||||
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
}
|
||||||
- name: Generate maven config
|
- name: Generate maven config
|
||||||
uses: http://139.9.216.111:3000/bamanker/maven-settings-action@v3.1.0
|
uses: http://139.9.216.111:3000/bamanker/maven-settings-action@v3.1.0
|
||||||
with:
|
with:
|
||||||
@@ -81,8 +87,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "The app version is $APP_TAG" && echo "tag=$APP_TAG" >> $GITHUB_OUTPUT &&
|
echo "The app version is $APP_TAG" && echo "tag=$APP_TAG" >> $GITHUB_OUTPUT &&
|
||||||
echo "now workspace: ${{ github.workspace }}" &&
|
echo "now workspace: ${{ github.workspace }}" &&
|
||||||
pwd &&
|
|
||||||
docker version
|
|
||||||
|
|
||||||
# 为其他配置文件注入环境变量
|
# 为其他配置文件注入环境变量
|
||||||
- name: Inject envVar
|
- name: Inject envVar
|
||||||
@@ -124,7 +128,12 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
TAG: ${{ steps.set_envar.outputs.tag }}
|
TAG: ${{ steps.set_envar.outputs.tag }}
|
||||||
run: |
|
run: |
|
||||||
docker buildx build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} --push .
|
ls &&
|
||||||
|
docker build --file Dockerfile --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} . &&
|
||||||
|
docker image ls
|
||||||
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
||||||
|
# ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} --push.
|
||||||
|
# uses: http://139.9.216.111:3000/bamanker/docker-build-push@v5
|
||||||
# with:
|
# with:
|
||||||
# context: .
|
# context: .
|
||||||
## platforms: linux/amd64
|
## platforms: linux/amd64
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# 基于 java25 构建
|
# 基于 java25 构建
|
||||||
FROM ubuntu:jammy
|
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/ubuntu:jammy
|
||||||
# 基于构建上下文 . 进行COPY 文件到 /root目录下
|
# 基于构建上下文 . 进行COPY 文件到 /root目录下
|
||||||
COPY target/myk3sTest /root/myk3sTest/
|
COPY target/myk3sTest /root/myk3sTest/
|
||||||
EXPOSE 9090
|
EXPOSE 9090
|
||||||
|
|||||||
Reference in New Issue
Block a user