Skip to content

Commit 2f2e6b8

Browse files
authored
Create dev-pipeline.yml
1 parent 02563b0 commit 2f2e6b8

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/dev-pipeline.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: DEV Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- deploy/base
7+
env:
8+
DOCKER_DRIVER: overlay2
9+
DOCKER_TLS_CERTDIR: ""
10+
DOCKER_HOST: tcp://docker:2375
11+
TARGETPLATFORMS: linux/amd64,linux/arm64
12+
13+
jobs:
14+
build-base:
15+
name: Build Docker Image Base Dev
16+
if: github.ref == 'refs/heads/deploy/base'
17+
runs-on: ubuntu-latest
18+
container:
19+
image: docker:28.1.1
20+
services:
21+
docker:
22+
image: docker:28.1.1-dind
23+
options: --privileged --env DOCKER_TLS_CERTDIR="" --mtu=1240
24+
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 }}
30+
steps:
31+
- uses: actions/checkout@v3
32+
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
38+
39+
- name: Set up Docker Buildx
40+
uses: docker/setup-buildx-action@v2
41+
42+
- name: Log in to Docker registry
43+
uses: docker/login-action@v2
44+
with:
45+
registry: ${{ env.REGISTRY_URL }}
46+
username: ${{ env.BASE_REGISTRY_USERNAME }}
47+
password: ${{ env.BASE_REGISTRY_PASSWORD }}
48+
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 .

0 commit comments

Comments
 (0)