Skip to content

Commit 9192f15

Browse files
committed
use actual dockerhub repo in taskfile
1 parent 7e0779c commit 9192f15

File tree

6 files changed

+65
-11
lines changed

6 files changed

+65
-11
lines changed

.github/workflows/image-ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: image-ci
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
tags:
8+
- "[0-9]*.[0-9]*.[0-9]*"
9+
10+
jobs:
11+
build-tag-push:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
image:
16+
- 06-demo-application/api-golang
17+
- 06-demo-application/api-node
18+
- 06-demo-application/client-react
19+
- 06-demo-application/load-generator-python
20+
- 06-demo-application/postgresql
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Install Task
27+
uses: arduino/setup-task@v2
28+
with:
29+
version: 3.x
30+
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v3
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
36+
37+
- name: Login to Docker Hub
38+
uses: docker/login-action@v2
39+
with:
40+
username: ${{ secrets.DOCKERHUB_USERNAME }}
41+
password: ${{ secrets.DOCKERHUB_TOKEN }}
42+
43+
- name: Generate Image Tag
44+
id: generate-image-tag
45+
working-directory: 14-cicd/github-actions
46+
run: |
47+
image_tag=$(task generate-version-tag)
48+
echo "image_tag=$image_tag" >> $GITHUB_OUTPUT
49+
50+
- name: Build Image
51+
env:
52+
IMAGE_TAG: ${{ steps.generate-image-tag.outputs.image_tag }}
53+
working-directory: ${{ matrix.image }}
54+
run: |
55+
task build-container-image-multi-arch IMAGE_TAG=${IMAGE_TAG}

06-demo-application/api-golang/Taskfile.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ version: "3"
22

33
vars:
44
DATABASE_URL: "postgres://postgres:foobarbaz@localhost:5432/postgres"
5-
IMAGE_REPO: localhost:5000/devops-directive-docker-course-api-golang
6-
# IMAGE_REPO: sidpalas/devops-directive-docker-course-api-golang
5+
IMAGE_REPO: sidpalas/devops-directive-docker-course-api-golang
76
IMAGE_TAG: foobarbaz
87

98
tasks:
@@ -28,3 +27,7 @@ tasks:
2827
--bare \
2928
--tags={{.IMAGE_TAG}} \
3029
--platform=all
30+
31+
build-container-image-multi-arch:
32+
cmds:
33+
- task: build-container-image

06-demo-application/api-node/Taskfile.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ version: "3"
22

33
vars:
44
DATABASE_URL: "postgres://postgres:foobarbaz@localhost:5432/postgres"
5-
IMAGE_REPO: localhost:5000/devops-directive-docker-course-api-node
6-
# IMAGE_REPO: sidpalas/devops-directive-docker-course-api-node
5+
IMAGE_REPO: sidpalas/devops-directive-docker-course-api-node
76
IMAGE_TAG: foobarbaz
87

98
tasks:

06-demo-application/client-react/Taskfile.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
version: "3"
22

33
vars:
4-
IMAGE_REPO: localhost:5000/devops-directive-docker-course-client-react-nginx
5-
# IMAGE_REPO: sidpalas/devops-directive-docker-course-client-react-nginx
4+
IMAGE_REPO: sidpalas/devops-directive-docker-course-client-react-nginx
65
IMAGE_TAG: foobarbaz
76

87
tasks:

06-demo-application/load-generator-python/Taskfile.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
version: "3"
22

33
vars:
4-
IMAGE_REPO: localhost:5000/devops-directive-kubernetes-course-load-generator-python
5-
# IMAGE_REPO: sidpalas/devops-directive-kubernetes-course-load-generator-python
4+
IMAGE_REPO: sidpalas/devops-directive-kubernetes-course-load-generator-python
65
IMAGE_TAG: foobarbaz
76

87
tasks:
@@ -29,5 +28,5 @@ tasks:
2928
run:
3029
desc: Start load generator
3130
cmds:
32-
# api-golang is listening on port 8080
33-
- API_URL=http://localhost:8080/ DELAY_MS=100 poetry run python main.py
31+
# api-golang is listening on port 8000
32+
- API_URL=http://localhost:8000/ DELAY_MS=100 poetry run python main.py

06-demo-application/postgresql/Taskfile.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
version: "3"
22

33
vars:
4-
# IMAGE_REPO: localhost:5000/devops-directive-kubernetes-course-db-migrator
54
IMAGE_REPO: sidpalas/devops-directive-kubernetes-course-db-migrator
65
IMAGE_TAG: foobarbaz
76

0 commit comments

Comments
 (0)