Skip to content

Commit ff19674

Browse files
authored
Update dev-pipeline.yml
1 parent 7c624d6 commit ff19674

File tree

1 file changed

+17
-29
lines changed

1 file changed

+17
-29
lines changed

.github/workflows/dev-pipeline.yml

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,38 @@ on:
55
branches:
66
- deploy/base
77
env:
8-
DOCKER_DRIVER: overlay2
9-
DOCKER_TLS_CERTDIR: ""
10-
DOCKER_HOST: tcp://docker:2375
118
TARGETPLATFORMS: linux/amd64,linux/arm64
9+
# common registry info
10+
REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
1211

1312
jobs:
1413
build-base:
15-
name: Build Docker Image Base Dev
1614
if: github.ref == 'refs/heads/deploy/base'
1715
runs-on: ubuntu-latest
18-
container:
19-
image: docker:28.1.1
20-
services:
21-
docker:
22-
image: ghcr.io/your-org/docker-dind:mtu-1240
23-
options: --privileged --env DOCKER_TLS_CERTDIR=""
2416
env:
25-
REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
26-
BASE_REGISTRY_USERNAME: ${{ secrets.BASE_REGISTRY_USERNAME }}
27-
BASE_REGISTRY_PASSWORD: ${{ secrets.BASE_REGISTRY_PASSWORD }}
28-
BASE_REGISTRY_PROJECT: ${{ secrets.BASE_REGISTRY_PROJECT }}
29-
CI_PIPELINE_ID: ${{ github.run_id }}
17+
PROJECT: ${{ secrets.BASE_REGISTRY_PROJECT }}
18+
IMAGE: access-management-api
19+
TAG: ${{ github.run_id }}
3020
steps:
3121
- uses: actions/checkout@v3
3222

33-
- name: Show Docker info
34-
run: docker info
35-
36-
- name: Register QEMU emulation
37-
run: docker run --privileged --rm tonistiigi/binfmt --install all
23+
- name: Set up QEMU
24+
uses: docker/setup-qemu-action@v2
3825

3926
- name: Set up Docker Buildx
4027
uses: docker/setup-buildx-action@v2
4128

42-
- name: Log in to Docker registry
29+
- name: Log in to registry
4330
uses: docker/login-action@v2
4431
with:
4532
registry: ${{ env.REGISTRY_URL }}
46-
username: ${{ env.BASE_REGISTRY_USERNAME }}
47-
password: ${{ env.BASE_REGISTRY_PASSWORD }}
33+
username: ${{ secrets.BASE_REGISTRY_USERNAME }}
34+
password: ${{ secrets.BASE_REGISTRY_PASSWORD }}
4835

49-
- name: Build and push multi-arch image
50-
run: |
51-
docker buildx build \
52-
--platform ${{ env.TARGETPLATFORMS }} \
53-
-t ${{ env.REGISTRY_URL }}/${{ env.BASE_REGISTRY_PROJECT }}/access-management-api:${{ env.CI_PIPELINE_ID }} \
54-
--push .
36+
- name: Build & push multi-arch image
37+
uses: docker/build-push-action@v3
38+
with:
39+
context: .
40+
platforms: ${{ env.TARGETPLATFORMS }}
41+
push: true
42+
tags: ${{ env.REGISTRY_URL }}/${{ env.PROJECT }}/${{ env.IMAGE }}:${{ env.TAG }}

0 commit comments

Comments
 (0)