Skip to content

Commit 1a85fb5

Browse files
committed
Update GitHub Actions workflow for Docker
Upgrade the actions/checkout to v4 and add Go environment setup. Simplify the build and push steps, removing the need for QEMU and Docker Buildx, and use a custom script for building multi-architecture images.
1 parent 6e7b105 commit 1a85fb5

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

.github/workflows/push-docker.yaml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@ jobs:
1111
docker:
1212
runs-on: buildjet-2vcpu-ubuntu-2204
1313
steps:
14-
-
15-
name: Checkout
16-
uses: actions/checkout@v3
17-
with:
18-
ref: ${{ github.ref }} # Use the reference to the release
19-
-
20-
name: Set up QEMU
21-
uses: docker/setup-qemu-action@v3
22-
-
23-
name: Set up Docker Buildx
24-
uses: docker/setup-buildx-action@v3
25-
-
26-
name: Login to Docker Hub
27-
uses: docker/login-action@v3
28-
with:
29-
registry: ${{ secrets.DOCKER_REGISTRY }}
30-
username: ${{ secrets.DOCKER_USERNAME }}
31-
password: ${{ secrets.DOCKER_PASSWORD }}
32-
-
33-
name: Build and push
34-
uses: docker/build-push-action@v5
35-
with:
36-
context: .
37-
platforms: linux/amd64,linux/arm64
38-
push: true
39-
tags: 'v2:dev' # Use the release tag as the image tag
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
submodules: recursive
18+
19+
- name: Setup Go Env
20+
uses: actions/setup-go@v4
21+
with:
22+
go-version: "1.22"
23+
24+
- name: Login to Registry
25+
uses: docker/login-action@v1
26+
with:
27+
registry: ${{ secrets.DOCKER_REGISTRY }}
28+
username: ${{ secrets.DOCKER_USERNAME }}
29+
password: ${{ secrets.DOCKER_PASSWORD }}
30+
31+
- name: Build push image
32+
env:
33+
TAG: dev
34+
ARCH: amd64
35+
ENABLE_PROXY: "false"
36+
BASE_IMAGE_TAG: "debug"
37+
run: |
38+
echo "building images..."
39+
build-push-multi-arch-image

0 commit comments

Comments
 (0)