Skip to content

Commit 8e2b69e

Browse files
committed
reenable build, rename github PAT secret
1 parent 542fcb3 commit 8e2b69e

File tree

1 file changed

+60
-60
lines changed

1 file changed

+60
-60
lines changed

.github/workflows/image-ci.yml

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -8,68 +8,68 @@ on:
88
- "[0-9]*.[0-9]*.[0-9]*"
99

1010
jobs:
11-
# build-tag-push:
12-
# runs-on: ubuntu-latest
13-
# strategy:
14-
# matrix:
15-
# path:
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-
# with:
26-
# # Necessary to get all tags for IMAGE_TAG generation with git describe
27-
# fetch-depth: 0
28-
29-
# - name: Install Task
30-
# uses: arduino/setup-task@v2
31-
# with:
32-
# version: 3.x
33-
34-
# - name: Set up QEMU
35-
# uses: docker/setup-qemu-action@v3
36-
37-
# - name: Set up Docker Buildx
38-
# uses: docker/setup-buildx-action@v3
39-
40-
# - name: Login to Docker Hub
41-
# uses: docker/login-action@v3
42-
# with:
43-
# username: ${{ secrets.DOCKERHUB_USERNAME }}
44-
# password: ${{ secrets.DOCKERHUB_TOKEN }}
45-
46-
# - name: Generate Image Tag
47-
# id: generate-image-tag
48-
# working-directory: 14-cicd/github-actions
49-
# run: |
50-
# image_tag=$(task generate-version-tag)
51-
# echo "image_tag=$image_tag" >> $GITHUB_OUTPUT
52-
53-
# - uses: actions/setup-go@v4
54-
# if: matrix.path == '06-demo-application/api-golang'
55-
# with:
56-
# go-version: "1.22.x"
57-
58-
# - uses: ko-build/[email protected]
59-
# if: matrix.path == '06-demo-application/api-golang'
60-
# with:
61-
# version: v0.15.4
62-
63-
# - name: Build Image
64-
# env:
65-
# IMAGE_TAG: ${{ steps.generate-image-tag.outputs.image_tag }}
66-
# working-directory: ${{ matrix.path }}
67-
# run: |
68-
# task build-container-image-multi-arch IMAGE_TAG=${IMAGE_TAG}
11+
build-tag-push:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
path:
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+
with:
26+
# Necessary to get all tags for IMAGE_TAG generation with git describe
27+
fetch-depth: 0
28+
29+
- name: Install Task
30+
uses: arduino/setup-task@v2
31+
with:
32+
version: 3.x
33+
34+
- name: Set up QEMU
35+
uses: docker/setup-qemu-action@v3
36+
37+
- name: Set up Docker Buildx
38+
uses: docker/setup-buildx-action@v3
39+
40+
- name: Login to Docker Hub
41+
uses: docker/login-action@v3
42+
with:
43+
username: ${{ secrets.DOCKERHUB_USERNAME }}
44+
password: ${{ secrets.DOCKERHUB_TOKEN }}
45+
46+
- name: Generate Image Tag
47+
id: generate-image-tag
48+
working-directory: 14-cicd/github-actions
49+
run: |
50+
image_tag=$(task generate-version-tag)
51+
echo "image_tag=$image_tag" >> $GITHUB_OUTPUT
52+
53+
- uses: actions/setup-go@v4
54+
if: matrix.path == '06-demo-application/api-golang'
55+
with:
56+
go-version: "1.22.x"
57+
58+
- uses: ko-build/[email protected]
59+
if: matrix.path == '06-demo-application/api-golang'
60+
with:
61+
version: v0.15.4
62+
63+
- name: Build Image
64+
env:
65+
IMAGE_TAG: ${{ steps.generate-image-tag.outputs.image_tag }}
66+
working-directory: ${{ matrix.path }}
67+
run: |
68+
task build-container-image-multi-arch IMAGE_TAG=${IMAGE_TAG}
6969
7070
update-tags:
7171
runs-on: ubuntu-latest
72-
# needs: build-tag-push
72+
needs: build-tag-push
7373

7474
steps:
7575
- name: Checkout
@@ -108,4 +108,4 @@ jobs:
108108
- name: Create Pull Request
109109
uses: peter-evans/create-pull-request@v6
110110
with:
111-
token: ${{ secrets.DEVOPS_DIRECTIVE_KUBERNETES_COURSE_GITHUB_ACTION }}
111+
token: ${{ secrets.DEVOPS_DIRECTIVE_KUBERNETES_COURSE_GITHUB_ACTION_PAT }}

0 commit comments

Comments
 (0)