|
88 | 88 | # Use tags / labels provided by 'docker/metadata-action' above |
89 | 89 | tags: ${{ steps.meta_build.outputs.tags }} |
90 | 90 | labels: ${{ steps.meta_build.outputs.labels }} |
| 91 | + |
| 92 | + ##################################################### |
| 93 | + # Build/Push the 'dspace/dspace-angular' image ('-dist' tag) |
| 94 | + ##################################################### |
| 95 | + # https://github.com/docker/metadata-action |
| 96 | + # Get Metadata for docker_build_dist step below |
| 97 | + - name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-angular-dist' image |
| 98 | + id: meta_build_dist |
| 99 | + uses: docker/metadata-action@v4 |
| 100 | + with: |
| 101 | + images: dspace/dspace-angular |
| 102 | + tags: ${{ env.IMAGE_TAGS }} |
| 103 | + # As this is a "dist" image, its tags are all suffixed with "-dist". Otherwise, it uses the same |
| 104 | + # tagging logic as the primary 'dspace/dspace-angular' image above. |
| 105 | + flavor: ${{ env.TAGS_FLAVOR }} |
| 106 | + suffix=-dist |
| 107 | + |
| 108 | + - name: Build and push 'dspace-angular-dist' image |
| 109 | + id: docker_build_dist |
| 110 | + uses: docker/build-push-action@v3 |
| 111 | + with: |
| 112 | + context: . |
| 113 | + file: ./Dockerfile.dist |
| 114 | + platforms: ${{ env.PLATFORMS }} |
| 115 | + # For pull requests, we run the Docker build (to ensure no PR changes break the build), |
| 116 | + # but we ONLY do an image push to DockerHub if it's NOT a PR |
| 117 | + push: ${{ github.event_name != 'pull_request' }} |
| 118 | + # Use tags / labels provided by 'docker/metadata-action' above |
| 119 | + tags: ${{ steps.meta_build_dist.outputs.tags }} |
| 120 | + labels: ${{ steps.meta_build_dist.outputs.labels }} |
0 commit comments