|
7 | 7 | - '**'
|
8 | 8 |
|
9 | 9 | jobs:
|
10 |
| - buildx: |
| 10 | + buildx-armv7: |
11 | 11 | runs-on: ubuntu-20.04
|
12 | 12 | steps:
|
13 | 13 | -
|
@@ -47,19 +47,160 @@ jobs:
|
47 | 47 | with:
|
48 | 48 | context: .
|
49 | 49 | builder: ${{ steps.buildx.outputs.name }}
|
50 |
| - platforms: linux/arm64,linux/amd64 |
51 |
| - #linux/arm/v7, |
| 50 | + platforms: linux/arm/v7 |
52 | 51 | push: true
|
53 | 52 | tags: |
|
54 |
| - hvalev/monero-node:${{ steps.get_version.outputs.version }} |
55 |
| - hvalev/monero-node:latest |
| 53 | + hvalev/monero-node:${{ steps.get_version.outputs.version }}-armv7 |
| 54 | + hvalev/monero-node:latest-armv7 |
56 | 55 | cache-from: type=local,src=/tmp/.buildx-cache
|
57 | 56 | cache-to: type=local,dest=/tmp/.buildx-cache-new
|
58 | 57 | -
|
59 | 58 | name: Move cache
|
60 | 59 | run: |
|
61 | 60 | rm -rf /tmp/.buildx-cache
|
62 | 61 | mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
| 62 | +
|
| 63 | + buildx-arm64: |
| 64 | + runs-on: ubuntu-20.04 |
| 65 | + steps: |
| 66 | + - |
| 67 | + name: Checkout |
| 68 | + uses: actions/checkout@v2 |
| 69 | + - |
| 70 | + name: Get Version |
| 71 | + id: get_version |
| 72 | + |
| 73 | + - |
| 74 | + name: Set up QEMU |
| 75 | + uses: docker/setup-qemu-action@v1 |
| 76 | + - |
| 77 | + name: Set up Docker Buildx |
| 78 | + id: buildx |
| 79 | + uses: docker/setup-buildx-action@v1 |
| 80 | + - |
| 81 | + name: Cache Docker layers |
| 82 | + |
| 83 | + with: |
| 84 | + path: /tmp/.buildx-cache |
| 85 | + key: ${{ runner.os }}-buildx-${{ github.sha }} |
| 86 | + restore-keys: | |
| 87 | + ${{ runner.os }}-buildx- |
| 88 | + - |
| 89 | + name: Available platforms |
| 90 | + run: echo ${{ steps.buildx.outputs.platforms }} |
| 91 | + - |
| 92 | + name: Login to DockerHub |
| 93 | + uses: docker/login-action@v1 |
| 94 | + with: |
| 95 | + username: ${{ secrets.DOCKERHUBUNAME }} |
| 96 | + password: ${{ secrets.DOCKERHUBTOKEN }} |
| 97 | + - |
| 98 | + name: Build and push |
| 99 | + uses: docker/build-push-action@v2 |
| 100 | + with: |
| 101 | + context: . |
| 102 | + builder: ${{ steps.buildx.outputs.name }} |
| 103 | + platforms: linux/arm64 |
| 104 | + push: true |
| 105 | + tags: | |
| 106 | + hvalev/monero-node:${{ steps.get_version.outputs.version }}-arm64 |
| 107 | + hvalev/monero-node:latest-arm64 |
| 108 | + cache-from: type=local,src=/tmp/.buildx-cache |
| 109 | + cache-to: type=local,dest=/tmp/.buildx-cache-new |
| 110 | + - |
| 111 | + name: Move cache |
| 112 | + run: | |
| 113 | + rm -rf /tmp/.buildx-cache |
| 114 | + mv /tmp/.buildx-cache-new /tmp/.buildx-cache |
| 115 | +
|
| 116 | + buildx-amd64: |
| 117 | + runs-on: ubuntu-20.04 |
| 118 | + steps: |
| 119 | + - |
| 120 | + name: Checkout |
| 121 | + uses: actions/checkout@v2 |
| 122 | + - |
| 123 | + name: Get Version |
| 124 | + id: get_version |
| 125 | + |
| 126 | + - |
| 127 | + name: Set up QEMU |
| 128 | + uses: docker/setup-qemu-action@v1 |
| 129 | + - |
| 130 | + name: Set up Docker Buildx |
| 131 | + id: buildx |
| 132 | + uses: docker/setup-buildx-action@v1 |
| 133 | + - |
| 134 | + name: Cache Docker layers |
| 135 | + |
| 136 | + with: |
| 137 | + path: /tmp/.buildx-cache |
| 138 | + key: ${{ runner.os }}-buildx-${{ github.sha }} |
| 139 | + restore-keys: | |
| 140 | + ${{ runner.os }}-buildx- |
| 141 | + - |
| 142 | + name: Available platforms |
| 143 | + run: echo ${{ steps.buildx.outputs.platforms }} |
| 144 | + - |
| 145 | + name: Login to DockerHub |
| 146 | + uses: docker/login-action@v1 |
| 147 | + with: |
| 148 | + username: ${{ secrets.DOCKERHUBUNAME }} |
| 149 | + password: ${{ secrets.DOCKERHUBTOKEN }} |
| 150 | + - |
| 151 | + name: Build and push |
| 152 | + uses: docker/build-push-action@v2 |
| 153 | + with: |
| 154 | + context: . |
| 155 | + builder: ${{ steps.buildx.outputs.name }} |
| 156 | + platforms: linux/amd64 |
| 157 | + push: true |
| 158 | + tags: | |
| 159 | + hvalev/monero-node:${{ steps.get_version.outputs.version }}-amd64 |
| 160 | + hvalev/monero-node:latest-amd64 |
| 161 | + cache-from: type=local,src=/tmp/.buildx-cache |
| 162 | + cache-to: type=local,dest=/tmp/.buildx-cache-new |
| 163 | + - |
| 164 | + name: Move cache |
| 165 | + run: | |
| 166 | + rm -rf /tmp/.buildx-cache |
| 167 | + mv /tmp/.buildx-cache-new /tmp/.buildx-cache |
| 168 | +
|
| 169 | + collate: |
| 170 | + needs: [buildx-armv7,buildx-arm64,buildx-amd64] |
| 171 | + runs-on: ubuntu-20.04 |
| 172 | + steps: |
| 173 | + - |
| 174 | + name: Checkout |
| 175 | + uses: actions/checkout@v2 |
| 176 | + - |
| 177 | + name: Get Version |
| 178 | + id: get_version |
| 179 | + |
| 180 | + - |
| 181 | + name: Login to Docker Hub |
| 182 | + uses: docker/login-action@v1 |
| 183 | + with: |
| 184 | + username: ${{ secrets.DOCKERHUBUNAME }} |
| 185 | + password: ${{ secrets.DOCKERHUBTOKEN }} |
| 186 | + - |
| 187 | + name: Create and push versioned multi-architecture image manifest |
| 188 | + env: |
| 189 | + IMAGE_TAG: ${{ steps.get_version.outputs.version }} |
| 190 | + run: | |
| 191 | + docker buildx imagetools create --tag hvalev/monero-node:${{ steps.get_version.outputs.version }} \ |
| 192 | + hvalev/monero-node:${{ steps.get_version.outputs.version }}-armv7 \ |
| 193 | + hvalev/monero-node:${{ steps.get_version.outputs.version }}-arm64 \ |
| 194 | + hvalev/monero-node:${{ steps.get_version.outputs.version }}-amd64 |
| 195 | + - |
| 196 | + name: Create and push latest multi-architecture image manifest |
| 197 | + env: |
| 198 | + IMAGE_TAG: latest |
| 199 | + run: | |
| 200 | + docker buildx imagetools create --tag hvalev/monero-node:latest \ |
| 201 | + hvalev/monero-node:latest-armv7 \ |
| 202 | + hvalev/monero-node:latest-arm64 \ |
| 203 | + hvalev/monero-node:latest-amd64 |
63 | 204 | -
|
64 | 205 | name: Docker Hub Description
|
65 | 206 | uses: peter-evans/dockerhub-description@v2
|
|
0 commit comments