File tree Expand file tree Collapse file tree 6 files changed +65
-11
lines changed Expand file tree Collapse file tree 6 files changed +65
-11
lines changed Original file line number Diff line number Diff line change 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}
Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ version: "3"
22
33vars :
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
98tasks :
2827 --bare \
2928 --tags={{.IMAGE_TAG}} \
3029 --platform=all
30+
31+ build-container-image-multi-arch :
32+ cmds :
33+ - task : build-container-image
Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ version: "3"
22
33vars :
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
98tasks :
Original file line number Diff line number Diff line change 11version : " 3"
22
33vars :
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
87tasks :
Original file line number Diff line number Diff line change 11version : " 3"
22
33vars :
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
87tasks :
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
Original file line number Diff line number Diff line change 11version : " 3"
22
33vars :
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
You can’t perform that action at this time.
0 commit comments