|
| 1 | +name: Publish build layer images |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + docker_tag: |
| 7 | + description: "Docker tag to be published" |
| 8 | + |
| 9 | +permissions: |
| 10 | + packages: write |
| 11 | + pull-requests: write |
| 12 | + id-token: write |
| 13 | + contents: read |
| 14 | + |
| 15 | +jobs: |
| 16 | + build_rust_amd64: |
| 17 | + uses: radixdlt/public-iac-resuable-artifacts/.github/workflows/docker-build.yml@main |
| 18 | + with: |
| 19 | + runs_on: ubuntu-16-cores-selfhosted |
| 20 | + environment: "release" |
| 21 | + image_registry: "docker.io" |
| 22 | + image_organization: "radixdlt" |
| 23 | + image_name: "babylon-node-build-layers" |
| 24 | + tag: ${{ inputs.docker_tag }}-rust |
| 25 | + context: "." |
| 26 | + dockerfile: docker/base-images/rust-builder.dockerfile |
| 27 | + target: "babylon-node-build-layers" |
| 28 | + platforms: "linux/amd64" |
| 29 | + provenance: "false" |
| 30 | + scan_image: true |
| 31 | + snyk_target_ref: ${{ github.ref_name }} |
| 32 | + enable_dockerhub: true |
| 33 | + use_gh_remote_cache: true |
| 34 | + cache_tag_suffix: amd64 |
| 35 | + flavor: | |
| 36 | + suffix=-amd64 |
| 37 | + secrets: |
| 38 | + role_to_assume: ${{ secrets.DOCKERHUB_RELEASER_ROLE }} |
| 39 | + |
| 40 | + build_rust_arm64: |
| 41 | + uses: radixdlt/public-iac-resuable-artifacts/.github/workflows/docker-build.yml@main |
| 42 | + with: |
| 43 | + runs_on: selfhosted-ubuntu-22.04-arm |
| 44 | + environment: "release" |
| 45 | + image_registry: "docker.io" |
| 46 | + image_organization: "radixdlt" |
| 47 | + image_name: "babylon-node-build-layers" |
| 48 | + tag: ${{ inputs.docker_tag }}-rust |
| 49 | + context: "." |
| 50 | + dockerfile: docker/base-images/rust-builder.dockerfile |
| 51 | + target: "babylon-node-build-layers" |
| 52 | + platforms: "linux/arm64" |
| 53 | + provenance: "false" |
| 54 | + scan_image: false |
| 55 | + snyk_target_ref: ${{ github.ref_name }} |
| 56 | + enable_dockerhub: true |
| 57 | + use_gh_remote_cache: true |
| 58 | + cache_tag_suffix: arm64 |
| 59 | + flavor: | |
| 60 | + suffix=-arm64 |
| 61 | + secrets: |
| 62 | + role_to_assume: ${{ secrets.DOCKERHUB_RELEASER_ROLE }} |
| 63 | + |
| 64 | + join_rust_multiarch_image: |
| 65 | + name: Join multiarch image |
| 66 | + needs: |
| 67 | + - build_rust_amd64 |
| 68 | + - build_rust_arm64 |
| 69 | + permissions: |
| 70 | + id-token: write |
| 71 | + contents: read |
| 72 | + pull-requests: read |
| 73 | + uses: radixdlt/public-iac-resuable-artifacts/.github/workflows/join-docker-images-all-tags.yml@main |
| 74 | + with: |
| 75 | + aws_dockerhub_secret: github-actions/rdxworks/dockerhub-images/release-credentials |
| 76 | + amd_meta_data_json: ${{needs.build_rust_amd64.outputs.json}} |
| 77 | + secrets: |
| 78 | + role-to-assume: ${{ secrets.DOCKERHUB_RELEASER_ROLE }} |
| 79 | + |
| 80 | + build_java_amd64: |
| 81 | + uses: radixdlt/public-iac-resuable-artifacts/.github/workflows/docker-build.yml@main |
| 82 | + with: |
| 83 | + runs_on: ubuntu-16-cores-selfhosted |
| 84 | + environment: "release" |
| 85 | + image_registry: "docker.io" |
| 86 | + image_organization: "radixdlt" |
| 87 | + image_name: "babylon-node-build-layers" |
| 88 | + tag: ${{ inputs.docker_tag }}-java |
| 89 | + context: "." |
| 90 | + dockerfile: docker/base-images/java-builder.dockerfile |
| 91 | + target: "babylon-node-build-layers" |
| 92 | + platforms: "linux/amd64" |
| 93 | + provenance: "false" |
| 94 | + scan_image: true |
| 95 | + snyk_target_ref: ${{ github.ref_name }} |
| 96 | + enable_dockerhub: true |
| 97 | + use_gh_remote_cache: true |
| 98 | + cache_tag_suffix: amd64 |
| 99 | + flavor: | |
| 100 | + suffix=-amd64 |
| 101 | + secrets: |
| 102 | + role_to_assume: ${{ secrets.DOCKERHUB_RELEASER_ROLE }} |
| 103 | + |
| 104 | + build_java_arm64: |
| 105 | + uses: radixdlt/public-iac-resuable-artifacts/.github/workflows/docker-build.yml@main |
| 106 | + with: |
| 107 | + runs_on: selfhosted-ubuntu-22.04-arm |
| 108 | + environment: "release" |
| 109 | + image_registry: "docker.io" |
| 110 | + image_organization: "radixdlt" |
| 111 | + image_name: "babylon-node-build-layers" |
| 112 | + tag: ${{ inputs.docker_tag }}-java |
| 113 | + context: "." |
| 114 | + dockerfile: docker/base-images/java-builder.dockerfile |
| 115 | + target: "babylon-node-build-layers" |
| 116 | + platforms: "linux/arm64" |
| 117 | + provenance: "false" |
| 118 | + scan_image: false |
| 119 | + snyk_target_ref: ${{ github.ref_name }} |
| 120 | + enable_dockerhub: true |
| 121 | + use_gh_remote_cache: true |
| 122 | + cache_tag_suffix: arm64 |
| 123 | + flavor: | |
| 124 | + suffix=-arm64 |
| 125 | + secrets: |
| 126 | + role_to_assume: ${{ secrets.DOCKERHUB_RELEASER_ROLE }} |
| 127 | + |
| 128 | + join_java_multiarch_image: |
| 129 | + name: Join multiarch image |
| 130 | + needs: |
| 131 | + - build_java_amd64 |
| 132 | + - build_java_arm64 |
| 133 | + permissions: |
| 134 | + id-token: write |
| 135 | + contents: read |
| 136 | + pull-requests: read |
| 137 | + uses: radixdlt/public-iac-resuable-artifacts/.github/workflows/join-docker-images-all-tags.yml@main |
| 138 | + with: |
| 139 | + aws_dockerhub_secret: github-actions/rdxworks/dockerhub-images/release-credentials |
| 140 | + amd_meta_data_json: ${{needs.build_java_amd64.outputs.json}} |
| 141 | + secrets: |
| 142 | + role-to-assume: ${{ secrets.DOCKERHUB_RELEASER_ROLE }} |
| 143 | + |
| 144 | + build_app_amd64: |
| 145 | + uses: radixdlt/public-iac-resuable-artifacts/.github/workflows/docker-build.yml@main |
| 146 | + with: |
| 147 | + runs_on: ubuntu-16-cores-selfhosted |
| 148 | + environment: "release" |
| 149 | + image_registry: "docker.io" |
| 150 | + image_organization: "radixdlt" |
| 151 | + image_name: "babylon-node-build-layers" |
| 152 | + tag: ${{ inputs.docker_tag }}-app |
| 153 | + context: "." |
| 154 | + dockerfile: docker/base-images/app.dockerfile |
| 155 | + target: "babylon-node-build-layers" |
| 156 | + platforms: "linux/amd64" |
| 157 | + provenance: "false" |
| 158 | + scan_image: true |
| 159 | + snyk_target_ref: ${{ github.ref_name }} |
| 160 | + enable_dockerhub: true |
| 161 | + use_gh_remote_cache: true |
| 162 | + cache_tag_suffix: amd64 |
| 163 | + flavor: | |
| 164 | + suffix=-amd64 |
| 165 | + secrets: |
| 166 | + role_to_assume: ${{ secrets.DOCKERHUB_RELEASER_ROLE }} |
| 167 | + |
| 168 | + build_app_arm64: |
| 169 | + uses: radixdlt/public-iac-resuable-artifacts/.github/workflows/docker-build.yml@main |
| 170 | + with: |
| 171 | + runs_on: selfhosted-ubuntu-22.04-arm |
| 172 | + environment: "release" |
| 173 | + image_registry: "docker.io" |
| 174 | + image_organization: "radixdlt" |
| 175 | + image_name: "babylon-node-build-layers" |
| 176 | + tag: ${{ inputs.docker_tag }}-app |
| 177 | + context: "." |
| 178 | + dockerfile: docker/base-images/app.dockerfile |
| 179 | + target: "babylon-node-build-layers" |
| 180 | + platforms: "linux/arm64" |
| 181 | + provenance: "false" |
| 182 | + scan_image: false |
| 183 | + snyk_target_ref: ${{ github.ref_name }} |
| 184 | + enable_dockerhub: true |
| 185 | + use_gh_remote_cache: true |
| 186 | + cache_tag_suffix: arm64 |
| 187 | + flavor: | |
| 188 | + suffix=-arm64 |
| 189 | + secrets: |
| 190 | + role_to_assume: ${{ secrets.DOCKERHUB_RELEASER_ROLE }} |
| 191 | + |
| 192 | + join_app_multiarch_image: |
| 193 | + name: Join multiarch image |
| 194 | + needs: |
| 195 | + - build_app_amd64 |
| 196 | + - build_app_arm64 |
| 197 | + permissions: |
| 198 | + id-token: write |
| 199 | + contents: read |
| 200 | + pull-requests: read |
| 201 | + uses: radixdlt/public-iac-resuable-artifacts/.github/workflows/join-docker-images-all-tags.yml@main |
| 202 | + with: |
| 203 | + aws_dockerhub_secret: github-actions/rdxworks/dockerhub-images/release-credentials |
| 204 | + amd_meta_data_json: ${{needs.build_app_amd64.outputs.json}} |
| 205 | + secrets: |
| 206 | + role-to-assume: ${{ secrets.DOCKERHUB_RELEASER_ROLE }} |
0 commit comments