Skip to content

Commit dcbc767

Browse files
committed
docker ci-cd updates
1 parent 07f9c6a commit dcbc767

File tree

4 files changed

+107
-8
lines changed

4 files changed

+107
-8
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Docker Development Image CD
2+
3+
on:
4+
push:
5+
branches: [ dev ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
docker-cd:
10+
runs-on: ubuntu-latest
11+
steps:
12+
13+
- name: Checkout Repository
14+
uses: actions/checkout@v3
15+
with:
16+
submodules: true
17+
18+
- name: Setup Docker Buildx
19+
uses: docker/setup-buildx-action@v2
20+
21+
- name: Docker meta data
22+
id: docker-meta-data
23+
uses: docker/metadata-action@v4
24+
with:
25+
images: codexrems/request-generator
26+
flavor: latest=false
27+
28+
- name: Log in to Docker Hub
29+
uses: docker/login-action@v1
30+
with:
31+
username: ${{ secrets.DOCKER_USERNAME }}
32+
password: ${{ secrets.DOCKER_TOKEN }}
33+
34+
- name: Build and push Server Docker image
35+
uses: docker/build-push-action@v5
36+
with:
37+
context: .
38+
platforms: linux/amd64,linux/arm64
39+
push: true
40+
tags: codexrems/request-generator:experimental
41+
labels: ${{ steps.docker-meta-data.outputs.labels }}

.github/workflows/docker-cd.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,40 @@ name: Docker Image CD
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ main ]
66
workflow_dispatch:
77

88
jobs:
99
docker-cd:
1010
runs-on: ubuntu-latest
1111
steps:
12+
1213
- name: Checkout Repository
13-
uses: actions/checkout@v2
14-
14+
uses: actions/checkout@v3
15+
with:
16+
submodules: true
17+
18+
- name: Setup Docker Buildx
19+
uses: docker/setup-buildx-action@v2
20+
21+
- name: Docker meta data
22+
id: docker-meta-data
23+
uses: docker/metadata-action@v4
24+
with:
25+
images: codexrems/request-generator
26+
flavor: latest=false
27+
1528
- name: Log in to Docker Hub
1629
uses: docker/login-action@v1
1730
with:
1831
username: ${{ secrets.DOCKER_USERNAME }}
1932
password: ${{ secrets.DOCKER_TOKEN }}
2033

2134
- name: Build and push Server Docker image
22-
uses: docker/build-push-action@v2
35+
uses: docker/build-push-action@v5
2336
with:
2437
context: .
38+
platforms: linux/amd64,linux/arm64
2539
push: true
26-
tags: codexrems/crd-request-generator:REMSvlatest
40+
tags: codexrems/request-generator:latest
41+
labels: ${{ steps.docker-meta-data.outputs.labels }}

.github/workflows/docker-ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Docker Image CI
22

33
on:
44
pull_request:
5-
branches: [ master ]
5+
branches: [ main, dev ]
66
workflow_dispatch:
77

88

@@ -12,7 +12,9 @@ jobs:
1212
steps:
1313

1414
- name: Checkout Repository
15-
uses: actions/checkout@v2
16-
15+
uses: actions/checkout@v3
16+
with:
17+
submodules: true
18+
1719
- name: Test Server Docker image Builds
1820
run: docker build .
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Docker Tagged Image CD
2+
on:
3+
workflow_dispatch:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
13+
- name: Checkout Repository
14+
uses: actions/checkout@v3
15+
with:
16+
submodules: true
17+
18+
- name: Setup Docker Buildx
19+
uses: docker/setup-buildx-action@v2
20+
21+
- name: Docker meta data
22+
id: docker-meta-data
23+
uses: docker/metadata-action@v4
24+
with:
25+
images: codexrems/request-generator
26+
flavor: latest=false
27+
28+
- name: Log in to Docker Hub
29+
uses: docker/login-action@v2
30+
with:
31+
username: ${{ secrets.DOCKER_USERNAME }}
32+
password: ${{ secrets.DOCKER_TOKEN }}
33+
34+
- name: Build and push
35+
uses: docker/build-push-action@v5
36+
with:
37+
context: .
38+
push: true
39+
platforms: linux/amd64,linux/arm64
40+
tags: ${{ steps.docker-meta-data.outputs.tags }}
41+
labels: ${{ steps.docker-meta-data.outputs.labels }}

0 commit comments

Comments
 (0)