Skip to content

Commit e6e95df

Browse files
committed
add workflows/push-docker.yaml
1 parent dec5c1c commit e6e95df

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/push-docker.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Push arthas images to Docker Hub
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "The version number to push (e.g., 4.0.3)"
8+
required: true
9+
10+
jobs:
11+
build-and-push:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
# 步骤 1:检出 master 分支的代码
16+
- name: Checkout gh-pages branch
17+
uses: actions/checkout@v3
18+
with:
19+
ref: master
20+
21+
- name: Set up Docker Buildx
22+
uses: docker/setup-buildx-action@v3
23+
24+
- name: Log in to Docker Hub
25+
uses: docker/login-action@v3
26+
with:
27+
username: ${{ secrets.DOCKER_USERNAME }}
28+
password: ${{ secrets.DOCKER_PASSWORD }}
29+
30+
- name: Build Docker image
31+
run: |
32+
VERSION="${{ github.event.inputs.version }}"
33+
docker buildx build . --build-arg ARTHAS_VERSION=$VERSION --build-arg MIRROR=true -t hengyunabc/arthas:$VERSION -t hengyunabc/arthas:latest --platform=linux/arm64,linux/amd64 --push
34+
docker buildx build . --build-arg ARTHAS_VERSION=$VERSION --build-arg MIRROR=true -f Dockerfile-No-Jdk -t hengyunabc/arthas:$VERSION-no-jdk --platform=linux/arm64,linux/amd64 --push

0 commit comments

Comments
 (0)