|
1 | | -name: ReactiveSearch API server - Cluster, BYOC and Self-host Docker builds |
| 1 | +name: ReactiveSearch API server - Docker build |
2 | 2 |
|
3 | 3 | on: |
4 | | - release: |
5 | | - types: [ published ] |
6 | | - repository_dispatch: |
7 | | - types: [publish_docker] |
8 | | - workflow_dispatch: |
9 | | - |
| 4 | + release: |
| 5 | + types: [published] |
| 6 | + repository_dispatch: |
| 7 | + types: [publish_docker] |
| 8 | + workflow_dispatch: |
10 | 9 |
|
11 | 10 | jobs: |
| 11 | + build: |
| 12 | + runs-on: ubuntu-latest |
12 | 13 |
|
13 | | - build: |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v2 |
14 | 16 |
|
15 | | - runs-on: ubuntu-latest |
16 | | - |
17 | | - steps: |
18 | | - - uses: actions/checkout@v2 |
19 | | - |
20 | | - - name: Extract version from payload |
21 | | - id: get_version |
22 | | - run: echo "version=${{ github.event.client_payload.version }}" >> $GITHUB_OUTPUT |
23 | | - - name: Get Version For Release |
24 | | - id: get_version_release |
25 | | - uses: battila7/get-version-action@v2.2.1 |
26 | | - - |
27 | | - name: Set up QEMU |
28 | | - uses: docker/setup-qemu-action@v1 |
29 | | - - |
30 | | - name: Set up Docker Buildx |
31 | | - uses: docker/setup-buildx-action@v1 |
32 | | - - |
33 | | - name: Login to DockerHub |
34 | | - uses: docker/login-action@v1 |
35 | | - with: |
36 | | - username: ${{ secrets.DOCKERHUB_USERNAME }} |
37 | | - password: ${{ secrets.DOCKERHUB_TOKEN }} |
38 | | - - |
39 | | - name: Build and push latest image |
40 | | - uses: docker/build-push-action@v2 |
41 | | - with: |
42 | | - context: . |
43 | | - push: true |
44 | | - platforms: linux/amd64,linux/arm64 |
45 | | - tags: ${{ format('appbaseio/reactivesearch-api:{0}', steps.get_version.outputs.version || steps.get_version_release.outputs.version) }},appbaseio/reactivesearch-api:latest |
| 17 | + - name: Extract version from payload |
| 18 | + id: get_version |
| 19 | + run: echo "version=${{ github.event.client_payload.version }}" >> $GITHUB_OUTPUT |
| 20 | + - name: Get Version For Release |
| 21 | + id: get_version_release |
| 22 | + uses: battila7/get-version-action@v2.2.1 |
| 23 | + - name: Set up QEMU |
| 24 | + uses: docker/setup-qemu-action@v1 |
| 25 | + - name: Set up Docker Buildx |
| 26 | + uses: docker/setup-buildx-action@v1 |
| 27 | + - name: Login to DockerHub |
| 28 | + uses: docker/login-action@v1 |
| 29 | + with: |
| 30 | + username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 31 | + password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 32 | + - name: Build and push latest image |
| 33 | + uses: docker/build-push-action@v2 |
| 34 | + with: |
| 35 | + context: . |
| 36 | + push: true |
| 37 | + platforms: linux/amd64,linux/arm64 |
| 38 | + tags: ${{ format('appbaseio/reactivesearch-api:{0}', steps.get_version.outputs.version || steps.get_version_release.outputs.version) }},appbaseio/reactivesearch-api:latest |
0 commit comments