-
Notifications
You must be signed in to change notification settings - Fork 7.5k
34 lines (28 loc) · 1.14 KB
/
push-docker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Push arthas images to Docker Hub
on:
workflow_dispatch:
inputs:
version:
description: "The version number to push (e.g., 4.0.3)"
required: true
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
# 步骤 1:检出 master 分支的代码
- name: Checkout gh-pages branch
uses: actions/checkout@v3
with:
ref: master
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
run: |
VERSION="${{ github.event.inputs.version }}"
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
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