@@ -61,59 +61,10 @@ jobs:
61
61
build-docker-image :
62
62
# Update dependency: now needs 'versioning' instead of 'read-version'
63
63
needs : [versioning]
64
- runs-on : ubuntu-24.04
65
- env : # Define BRANCH_NAME if needed within this job's steps
66
- BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
67
- steps :
68
- - uses : actions/checkout@v4
69
- with :
70
- # Checkout the branch head. Assumes 'versioning' pushed updates if needed.
71
- ref : ${{ env.BRANCH_NAME }}
72
-
73
- - name : Set up JDK ${{vars.JAVA_VERSION}}
74
- uses : actions/setup-java@v4
75
- with :
76
- java-version : ${{vars.JAVA_VERSION}}
77
- distribution : ' adopt'
78
-
79
- - name : Set up node ${{vars.NODE_VERSION}}
80
- uses : actions/setup-node@v4
81
- with :
82
- node-version : ${{vars.NODE_VERSION}}
83
-
84
- - name : Install Dependencies
85
- run : cd ./frontend && npm ci
86
-
87
- - name : Build frontend with Angular
88
- run : cd ./frontend && npm run build
89
-
90
- - name : Build backend with Maven
91
- run : mvn -B clean package --file pom.xml -P build-for-docker
92
-
93
- - name : Set up Docker Buildx
94
- uses : docker/setup-buildx-action@v3
95
-
96
- - name : Build the docker image
97
- uses : docker/build-push-action@v6
98
- with :
99
- context : .
100
- file : docker/Dockerfile
101
- # Use output from the 'versioning' job
102
- tags : ${{ needs.versioning.outputs.IMAGE_TAG }}
103
- load : true
104
- push : false
105
- outputs : type=docker,dest=${{ runner.temp }}/okr-docker-image.tar
106
-
107
- - name : Upload artifact
108
- uses : actions/upload-artifact@v4
109
- with :
110
- name : okr-image
111
- path : ${{ runner.temp }}/okr-docker-image.tar
112
-
113
- - name : print imagetags
114
- run : echo ${{ needs.versioning.outputs.IMAGE_TAG }}
115
- - run : echo "${{ github.run_id }}"
116
- - run : echo "$(ls -la /tmp/)"
64
+ uses : ./.github/workflows/reusable__build.yml
65
+ with :
66
+ COMMIT_HASH : ${{ github.head_ref || github.ref_name }}
67
+ FULL_IMAGE_TAG : ${{needs.versioning.outputs.IMAGE_TAG}} # Use the output from the versioning job.
117
68
118
69
119
70
0 commit comments