diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 43813473c..b3535cee4 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -20,25 +20,16 @@ jobs: name: Build and push docker images to public Docker Hub strategy: matrix: - include: - - directory: jobs - project: mongodb_migration - - directory: jobs - project: cache_maintenance - - directory: services - project: admin - - directory: services - project: api - - directory: services - project: rows - - directory: services - project: search - - directory: services - project: sse-api - - directory: services - project: worker - - directory: services - project: webhook + project: + - mongodb_migration + - cache_maintenance + - admin + - api + - rows + - search + - sse-api + - worker + - webhook runs-on: "ubuntu-latest" steps: - name: Checkout repository @@ -57,21 +48,22 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.repository-prefix }}${{ matrix.directory }}-${{ matrix.project }} + images: ${{ env.repository-prefix }}-${{ matrix.project }} tags: | type=raw,value=sha-${{ steps.vars.outputs.sha_short }} - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . - file: ${{ matrix.directory }}/${{ matrix.project }}/Dockerfile + file: Dockerfile + target: ${{ matrix.project }} build-args: COMMIT=${{ steps.vars.outputs.sha_short }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} # see https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#registry-cache - cache-from: type=registry,ref=${{ env.repository-prefix }}${{ matrix.directory }}-${{ matrix.project }}:buildcache - cache-to: type=registry,ref=${{ env.repository-prefix }}${{ matrix.directory }}-${{ matrix.project }}:buildcache,mode=max + cache-from: type=registry,ref=${{ env.repository-prefix }}-${{ matrix.project }}:buildcache + cache-to: type=registry,ref=${{ env.repository-prefix }}-${{ matrix.project }}:buildcache,mode=max code-quality-helm: runs-on: ubuntu-latest