Skip to content

Commit 1957f6e

Browse files
committed
feat: enhance Docker workflows with manual inputs and multi-arch image support
1 parent 70cddf6 commit 1957f6e

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

.github/workflows/push-docker-v2-dev.yaml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,46 @@ on:
66
branches:
77
- release-v2-dev
88
workflow_dispatch:
9+
inputs:
10+
tag:
11+
type: string
12+
description: "Image tag manually"
13+
adc_version:
14+
type: string
15+
default: dev
16+
description: "adc version"
917
jobs:
1018
docker:
1119
runs-on: buildjet-2vcpu-ubuntu-2204
1220
steps:
1321
- name: Checkout
1422
uses: actions/checkout@v4
1523
with:
24+
ref: ${{ github.ref }}
1625
submodules: recursive
17-
1826
- name: Setup Go Env
1927
uses: actions/setup-go@v4
2028
with:
2129
go-version: "1.22"
2230

23-
# - name: Set up QEMU
24-
# uses: docker/setup-qemu-action@v3
25-
#
26-
# - name: Set up Docker Buildx
27-
# uses: docker/setup-buildx-action@v3
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v3
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
2836

2937
- name: Login to Registry
30-
uses: docker/login-action@v1
38+
uses: docker/login-action@v3
3139
with:
3240
registry: ${{ secrets.DOCKER_REGISTRY }}
3341
username: ${{ secrets.DOCKER_USERNAME }}
3442
password: ${{ secrets.DOCKER_PASSWORD }}
35-
36-
- name: Build push image
43+
-
44+
name: Build and push multi-arch image
3745
env:
38-
TAG: dev
39-
ARCH: amd64
40-
ENABLE_PROXY: "false"
41-
BASE_IMAGE_TAG: "debug"
46+
TAG: ${{ github.event.inputs.tag || github.ref_name }}-dev
47+
IMAGE_TAG: ${{ github.event.inputs.tag || github.ref_name }}-dev
48+
ADC_VERSION: ${{ github.event.inputs.adc_version }}
4249
run: |
43-
echo "building images..."
44-
make build-push-image
50+
echo "building multi-arch images with tag: $TAG"
51+
make build-push-multi-arch-image

.github/workflows/push-docker.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ name: push on dockerhub
22
on:
33
push:
44
tags:
5-
- '*'
6-
workflow_dispatch:
7-
inputs:
8-
tag:
9-
type: string
10-
description: "Image tag manually"
5+
- '*'
6+
117
jobs:
128
docker:
139
runs-on: buildjet-2vcpu-ubuntu-2204
@@ -37,8 +33,8 @@ jobs:
3733
-
3834
name: Build and push multi-arch image
3935
env:
40-
TAG: ${{ github.event.inputs || github.ref_name }}
41-
IMAGE_TAG: ${{ github.event.inputs || github.ref_name }}
36+
TAG: ${{ github.ref_name }}
37+
IMAGE_TAG: ${{ github.ref_name }}
4238
run: |
4339
echo "building multi-arch images with tag: $TAG"
4440
make build-push-multi-arch-image

0 commit comments

Comments
 (0)