Skip to content

Commit 626b561

Browse files
committed
update buildx action
1 parent b4cd1be commit 626b561

1 file changed

Lines changed: 31 additions & 18 deletions

File tree

.github/workflows/docker-image-testing.yaml

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,41 @@ jobs:
3030
- name: Run Go tests
3131
run: go test ./...
3232

33-
3433
# - name: Install Cosign
3534
# uses: sigstore/cosign-installer@v3.9.2
3635
# with:
3736
# cosign-release: 'v2.5.3'
38-
#
39-
# - name: Set up Docker Buildx
40-
# uses: docker/setup-buildx-action@v3
41-
#
42-
# - name: Login to Docker Hub
43-
# uses: docker/login-action@v3
44-
# with:
45-
# username: ${{ secrets.DOCKERHUB_USERNAME }}
46-
# password: ${{ secrets.DOCKERHUB_TOKEN }}
47-
#
48-
# - name: Login to GitHub Container Registry
49-
# uses: docker/login-action@v3
50-
# with:
51-
# registry: ghcr.io
52-
# username: ${{ github.actor }}
53-
# password: ${{ secrets.GITHUB_TOKEN }}
54-
#
37+
38+
- name: Set up Docker Buildx
39+
uses: docker/setup-buildx-action@v3
40+
41+
- name: Login to Docker Hub
42+
uses: docker/login-action@v3
43+
with:
44+
username: ${{ secrets.DOCKERHUB_USERNAME }}
45+
password: ${{ secrets.DOCKERHUB_TOKEN }}
46+
47+
- name: Login to GitHub Container Registry
48+
uses: docker/login-action@v3
49+
with:
50+
registry: ghcr.io
51+
username: ${{ github.actor }}
52+
password: ${{ secrets.GITHUB_TOKEN }}
53+
54+
- name: Build and push image to Docker Hub and GHCR
55+
uses: docker/build-push-action@v6
56+
id: push-all
57+
with:
58+
context: .
59+
platforms: linux/amd64,linux/arm/v7,linux/arm64
60+
push: true
61+
build-args: VERSION=testing-${{ github.sha }}
62+
tags: |
63+
docker.io/wollomatic/socket-proxy:testing
64+
docker.io/wollomatic/socket-proxy:testing-${{ github.sha }}
65+
ghcr.io/wollomatic/socket-proxy:testing
66+
ghcr.io/wollomatic/socket-proxy:testing-${{ github.sha }}
67+
5568
# - name: Build and push Docker Hub image
5669
# uses: docker/build-push-action@v5
5770
# id: push-dockerhub

0 commit comments

Comments
 (0)