|
24 | 24 | - name: Check out code
|
25 | 25 | uses: actions/checkout@v2
|
26 | 26 |
|
| 27 | + - name: Set up QEMU |
| 28 | + uses: docker/setup-qemu-action@v1 |
| 29 | + |
| 30 | + - name: Set up Docker Buildx |
| 31 | + id: buildx |
| 32 | + uses: docker/setup-buildx-action@v1 |
| 33 | + |
27 | 34 | - name: Check licenses
|
28 | 35 | env:
|
29 | 36 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
32 | 39 | - name: Run verification
|
33 | 40 | run: make check
|
34 | 41 |
|
35 |
| - - name: Build Docker image |
36 |
| - run: make docker |
| 42 | + - name: Get current timestamp |
| 43 | + id: timestamp |
| 44 | + run: echo "::set-output name=timestamp::$(date -u +'%Y-%m-%dT%H:%M:%SZ')" |
| 45 | + |
| 46 | + - name: Build APIClarity |
| 47 | + uses: docker/build-push-action@v2 |
| 48 | + with: |
| 49 | + context: . |
| 50 | + platforms: linux/amd64,linux/arm64 |
| 51 | + tags: ghcr.io/apiclarity/apiclarity:${{ github.sha }} |
| 52 | + file: Dockerfile |
| 53 | + cache-from: type=local,src=/tmp/.buildx-cache |
| 54 | + cache-to: type=local,dest=/tmp/.buildx-cache |
| 55 | + build-args: | |
| 56 | + VERSION=${{ github.sha }} |
| 57 | + BUILD_TIMESTAMP=${{ steps.timestamp.outputs.timestamp }} |
| 58 | + COMMIT_HASH=${{ github.sha }} |
| 59 | +
|
| 60 | + - name: Build Kong plugin |
| 61 | + uses: docker/build-push-action@v2 |
| 62 | + with: |
| 63 | + context: plugins |
| 64 | + platforms: linux/amd64,linux/arm64 |
| 65 | + tags: ghcr.io/apiclarity/kong-plugin:${{ github.sha }} |
| 66 | + file: plugins/Dockerfile.kong |
| 67 | + cache-from: type=local,src=/tmp/.buildx-cache |
| 68 | + cache-to: type=local,dest=/tmp/.buildx-cache |
| 69 | + |
| 70 | + - name: Fix Tyk Plugin API dep |
| 71 | + id: tyk-dep |
| 72 | + run: | |
| 73 | + cd plugins/gateway/tyk/v3.2.2 |
| 74 | + go mod edit -replace github.com/apiclarity/apiclarity/plugins/[email protected]=./../api |
| 75 | + go mod edit -replace github.com/apiclarity/apiclarity/plugins/[email protected]=./../common |
| 76 | +
|
| 77 | + - name: Build Tyk plugin |
| 78 | + uses: docker/build-push-action@v2 |
| 79 | + with: |
| 80 | + context: plugins |
| 81 | + platforms: linux/amd64 # tykio/tyk-plugin-compiler does not currently support other architectures |
| 82 | + tags: ghcr.io/apiclarity/tyk-plugin-v3.2.2:${{ github.sha }} |
| 83 | + file: plugins/Dockerfile.tyk.v3.2.2 |
| 84 | + cache-from: type=local,src=/tmp/.buildx-cache |
| 85 | + cache-to: type=local,dest=/tmp/.buildx-cache |
| 86 | + |
| 87 | + - name: Undo Tyk Plugin API dep change |
| 88 | + id: undo-tyk-dep |
| 89 | + run: git checkout -- plugins/gateway/tyk/v3.2.2/go.mod |
| 90 | + |
| 91 | + - name: Build passive taper |
| 92 | + uses: docker/build-push-action@v2 |
| 93 | + with: |
| 94 | + context: plugins |
| 95 | + platforms: linux/amd64,linux/arm64 |
| 96 | + tags: ghcr.io/apiclarity/passive-taper:${{ github.sha }} |
| 97 | + file: plugins/Dockerfile.taper |
| 98 | + cache-from: type=local,src=/tmp/.buildx-cache |
| 99 | + cache-to: type=local,dest=/tmp/.buildx-cache |
| 100 | + build-args: | |
| 101 | + VERSION=${{ github.sha }} |
37 | 102 |
|
38 | 103 | lint_chart:
|
39 | 104 | name: Lint Helm Chart
|
|
0 commit comments