|
16 | 16 | pi-compile:
|
17 | 17 | name: 'Parent Images: Compile Requirements'
|
18 | 18 | runs-on: ubuntu-latest
|
| 19 | + environment: dev |
19 | 20 | env:
|
20 | 21 | PYTHON_VERSION: ${{ vars.PYTHON_VERSION }}
|
21 | 22 | outputs:
|
@@ -44,23 +45,16 @@ jobs:
|
44 | 45 | bash cicd-deployment-scripts/pi/compile.sh \
|
45 | 46 | -p "${{ github.event.pull_request.number }}"
|
46 | 47 |
|
47 |
| - - name: Dump job context |
48 |
| - env: |
49 |
| - JOB_CONTEXT: ${{ toJson(job) }} |
50 |
| - run: echo "$JOB_CONTEXT" |
51 |
| - |
52 | 48 | pi-build:
|
53 |
| - name: 'Parent Images: Build' |
| 49 | + name: 'Parent Images: Docker Build' |
54 | 50 | runs-on: ubuntu-latest
|
55 | 51 | needs: pi-compile
|
| 52 | + environment: dev |
56 | 53 | env:
|
57 | 54 | PYTHON_VERSION: ${{ vars.PYTHON_VERSION }}
|
58 | 55 | DEV_CONTAINER_REGISTRY: ${{ vars.DEV_CONTAINER_REGISTRY }}
|
59 | 56 | DEV_LOGIN_USERNAME: ${{ secrets.DEV_LOGIN_USERNAME }}
|
60 | 57 | DEV_LOGIN_PASSWORD: ${{ secrets.DEV_LOGIN_PASSWORD }}
|
61 |
| - DOCKERHUB_CONTAINER_REGISTRY: ${{ vars.DOCKERHUB_CONTAINER_REGISTRY }} |
62 |
| - DOCKERHUB_LOGIN_USERNAME: ${{ secrets.DOCKERHUB_LOGIN_USERNAME }} |
63 |
| - DOCKERHUB_LOGIN_PASSWORD: ${{ secrets.DOCKERHUB_LOGIN_PASSWORD }} |
64 | 58 | IMAGE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.pull_request.head.ref }}
|
65 | 59 | strategy:
|
66 | 60 | matrix:
|
@@ -89,22 +83,54 @@ jobs:
|
89 | 83 | username: "${{ env.DEV_LOGIN_USERNAME }}"
|
90 | 84 | password: "${{ env.DEV_LOGIN_PASSWORD }}"
|
91 | 85 |
|
92 |
| - - name: Log into Docker Hub registry |
93 |
| - uses: docker/login-action@v3 |
| 86 | + - name: Build & Push refinery-${{ matrix.parent_image_type }}-parent-image:dev |
| 87 | + uses: docker/build-push-action@v5 |
94 | 88 | with:
|
95 |
| - username: "${{ env.DOCKERHUB_LOGIN_USERNAME }}" |
96 |
| - password: "${{ env.DOCKERHUB_LOGIN_PASSWORD }}" |
97 |
| - |
98 |
| - - name: Build & Push refinery-${{ matrix.parent_image_type }}-parent-image:amd64 |
99 |
| - if: ${{ github.event_name != 'release' }} |
| 89 | + cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:dev-${{ matrix.parent_image_type }}-cache |
| 90 | + cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:dev-${{ matrix.parent_image_type }}-cache,mode=max,image-manifest=true |
| 91 | + platforms: linux/amd64 |
| 92 | + file: Dockerfile |
| 93 | + tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:dev-${{ matrix.parent_image_type }} |
| 94 | + push: true |
| 95 | + build-args: | |
| 96 | + platform=linux/amd64 |
| 97 | + label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile |
| 98 | +
|
| 99 | + - name: Build & Push refinery-${{ matrix.parent_image_type }}-parent-image:dev-arm64 |
100 | 100 | uses: docker/build-push-action@v5
|
101 | 101 | with:
|
102 |
| - cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-image:dev-${{ matrix.parent_image_type }}-cache |
103 |
| - cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-image:dev-${{ matrix.parent_image_type }}-cache,mode=max,image-manifest=true |
| 102 | + cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:dev-${{ matrix.parent_image_type }}-arm64-cache |
| 103 | + cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:dev-${{ matrix.parent_image_type }}-arm64-cache,mode=max,image-manifest=true |
| 104 | + platforms: linux/arm64 |
| 105 | + file: Dockerfile |
| 106 | + tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:dev-${{ matrix.parent_image_type }}-arm64 |
| 107 | + push: true |
| 108 | + build-args: | |
| 109 | + platform=linux/arm64 |
| 110 | + label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile |
| 111 | +
|
| 112 | + - name: Build & Push refinery-${{ matrix.parent_image_type }}-parent-image:sha |
| 113 | + uses: docker/build-push-action@v5 |
| 114 | + with: |
| 115 | + cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-cache |
| 116 | + cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-cache,mode=max,image-manifest=true |
104 | 117 | platforms: linux/amd64
|
105 | 118 | file: Dockerfile
|
106 |
| - tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-image:dev-${{ matrix.parent_image_type }} |
| 119 | + tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }} |
107 | 120 | push: true
|
108 | 121 | build-args: |
|
109 | 122 | platform=linux/amd64
|
110 | 123 | label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
|
| 124 | +
|
| 125 | + - name: Build & Push refinery-${{ matrix.parent_image_type }}-parent-image:sha-arm64 |
| 126 | + uses: docker/build-push-action@v5 |
| 127 | + with: |
| 128 | + cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64-cache |
| 129 | + cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64-cache,mode=max,image-manifest=true |
| 130 | + platforms: linux/arm64 |
| 131 | + file: Dockerfile |
| 132 | + tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64 |
| 133 | + push: true |
| 134 | + build-args: | |
| 135 | + platform=linux/arm64 |
| 136 | + label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile |
0 commit comments