|
76 | 76 | runs-on: ubuntu-latest |
77 | 77 | if: ${{ needs.build-package-generic-unix.outputs.authorized }} == 'true' |
78 | 78 | steps: |
79 | | -<<<<<<< HEAD |
80 | | - - name: Prepare |
81 | | - run: | |
82 | | - platform=${{ matrix.platform }} |
83 | | - echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV |
84 | | -======= |
85 | | ->>>>>>> e796b61f4 (Simplified OCI builds) |
86 | 79 | - name: Checkout |
87 | 80 | uses: actions/checkout@v4 |
88 | 81 | - name: Download package-generic-unix |
@@ -121,79 +114,9 @@ jobs: |
121 | 114 | with: |
122 | 115 | push: true |
123 | 116 | context: packaging/docker-image |
124 | | -<<<<<<< HEAD |
125 | | - platforms: ${{ matrix.platform }} |
126 | | - labels: ${{ steps.meta.outputs.labels }} |
127 | | - cache-to: type=gha |
128 | | - cache-from: type=gha |
129 | | - outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true |
130 | | - - name: Export digest |
131 | | - run: | |
132 | | - mkdir -p /tmp/digests |
133 | | - digest="${{ steps.build.outputs.digest }}" |
134 | | - touch "/tmp/digests/${digest#sha256:}" |
135 | | - - name: Upload digest |
136 | | - uses: actions/upload-artifact@v4 |
137 | | - with: |
138 | | - name: digests-${{ env.PLATFORM_PAIR }} |
139 | | - path: /tmp/digests/* |
140 | | - if-no-files-found: error |
141 | | - retention-days: 1 |
142 | | - |
143 | | - merge: |
144 | | - needs: |
145 | | - - build |
146 | | - runs-on: ubuntu-latest |
147 | | - if: ${{ needs.build-package-generic-unix.outputs.authorized }} == 'true' |
148 | | - steps: |
149 | | - - name: Download digests |
150 | | - uses: actions/download-artifact@v4 |
151 | | - with: |
152 | | - path: /tmp/digests |
153 | | - pattern: digests-* |
154 | | - merge-multiple: true |
155 | | - - name: Set up Docker Buildx |
156 | | - uses: docker/setup-buildx-action@v3 |
157 | | - - name: Docker meta |
158 | | - id: meta |
159 | | - uses: docker/metadata-action@v5 |
160 | | - with: |
161 | | - images: ${{ env.REGISTRY_IMAGE }} |
162 | | - tags: | |
163 | | - type=ref,event=branch |
164 | | - type=ref,event=pr |
165 | | - type=sha,format=long |
166 | | - - name: Login to Docker Hub |
167 | | - uses: docker/login-action@v3 |
168 | | - with: |
169 | | - username: ${{ secrets.DOCKERHUB_USERNAME }} |
170 | | - password: ${{ secrets.DOCKERHUB_PASSWORD }} |
171 | | - - name: Create manifest list and push |
172 | | - working-directory: /tmp/digests |
173 | | - run: | |
174 | | - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ |
175 | | - $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) |
176 | | - - name: Inspect image |
177 | | - run: | |
178 | | - docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} |
179 | | -
|
180 | | - summary-oci: |
181 | | - needs: |
182 | | - - build-package-generic-unix |
183 | | - - build |
184 | | - - merge |
185 | | - runs-on: ubuntu-latest |
186 | | - steps: |
187 | | - - name: SUMMARY |
188 | | - run: | |
189 | | - cat << 'EOF' | jq -e 'map(.result == "success") | all(.)' |
190 | | - ${{ toJson(needs) }} |
191 | | - EOF |
192 | | -======= |
193 | 117 | platforms: ${{ github.event.inputs.build_arm && 'linux/amd64, linux/arm64' || 'linux/amd64' }} |
194 | 118 | tags: ${{ steps.meta.outputs.tags }} |
195 | 119 | cache-to: type=gha,mode=max,scope=${{ matrix.otp_version }} |
196 | 120 | cache-from: type=gha,scope=${{ matrix.otp_version }} |
197 | 121 | build-args: |
198 | 122 | OTP_VERSION=${{ matrix.otp_version }} |
199 | | ->>>>>>> e796b61f4 (Simplified OCI builds) |
0 commit comments