@@ -21,10 +21,19 @@ jobs:
2121
2222 build :
2323
24- runs-on : ubuntu-latest
24+ runs-on : ${{ matrix.runner }}
25+
26+ strategy :
27+ matrix :
28+ platform : [amd64, arm64]
29+ include :
30+ - platform : amd64
31+ runner : ubuntu-22.04
32+ - platform : arm64
33+ runner : ubuntu-22.04-arm
2534
2635 env :
27- working-directory : ./services/
36+ working-directory : ./services/elasticsearch
2837
2938 # Steps represent a sequence of tasks that will be executed as part of the job
3039 steps :
4453 id : meta
4554 uses : docker/metadata-action@v5
4655 with :
47- images : cogstacksystems/cogstack- kibana:latest
56+ images : cogstacksystems/kibana:latest
4857
4958 - uses : actions/checkout@v3
5059 - name : Get and set release version env var
@@ -73,26 +82,14 @@ jobs:
7382 echo $RELEASE_VERSION
7483
7584 - name : Build and push Docker Kibana image
76- uses : docker/build-push-action@v5
77- with :
78- platforms : linux/amd64
79- context : ./services/kibana
80- file : " ./services/kibana/Dockerfile_native"
81- allow : network.host
82- github-token : ${{ github.token }}
83- tags : cogstacksystems/cogstack-kibana:${{ env.RELEASE_VERSION }}
84- push : true
85-
85+ run : |
86+ docker build --platform linux/${{ matrix.platform }} -t cogstacksystems/kibana:${{ env.RELEASE_VERSION }}-${{ matrix.platform }} -f "./services/kibana/Dockerfile_native" --build-arg CPU_ARCHITECTURE=${{ matrix.platform }} .
87+ docker push cogstacksystems/kibana:${{ env.RELEASE_VERSION }}-${{ matrix.platform }}
88+
8689 - name : Build and push Docker Elasticsearch image
87- uses : docker/build-push-action@v5
88- with :
89- platforms : linux/amd64
90- context : ./services/elasticsearch
91- file : " ./services/elasticsearch/Dockerfile_native"
92- allow : network.host
93- github-token : ${{ github.token }}
94- tags : cogstacksystems/cogstack-elasticsearch:${{ env.RELEASE_VERSION }}
95- push : true
90+ run : |
91+ docker build --platform linux/${{ matrix.platform }} -t cogstacksystems/elasticsearch:${{ env.RELEASE_VERSION }}-${{ matrix.platform }} -f "./services/elasticsearch/Dockerfile_native" --build-arg CPU_ARCHITECTURE=${{ matrix.platform }} .
92+ docker push cogstacksystems/elasticsearch:${{ env.RELEASE_VERSION }}-${{ matrix.platform }}
9693
9794 - name : Image digest
9895 run : echo ${{ steps.docker_build.outputs.digest }}
0 commit comments