|
1 | 1 | name: Nightly Server test - Latest build
|
2 | 2 | on:
|
3 | 3 | workflow_dispatch:
|
| 4 | + inputs: |
| 5 | + promote: |
| 6 | + description: 'Promote the latest build to stable (if tests pass)' |
| 7 | + required: false |
| 8 | + default: false |
| 9 | + type: boolean |
4 | 10 | schedule: # UTC at 0300
|
5 | 11 | - cron: "0 3 * * *"
|
6 | 12 | # Trigger workflow when file is modified
|
@@ -200,3 +206,53 @@ jobs:
|
200 | 206 | }
|
201 | 207 | ]
|
202 | 208 | }
|
| 209 | +
|
| 210 | + promote-windows: |
| 211 | + needs: [windows-tests, linux-tests] |
| 212 | + runs-on: [self-hosted, Windows, pygeometry] |
| 213 | + name: Promote Windows container |
| 214 | + if: ${{ github.event.inputs.promote == 'true' || github.event_name == 'schedule' }} |
| 215 | + env: |
| 216 | + WINDOWS_UNSTABLE: ghcr.io/ansys/geometry:windows-latest-unstable |
| 217 | + WINDOWS_STABLE_GHCR: ghcr.io/ansys/geometry:windows-latest |
| 218 | + steps: |
| 219 | + - name: Login in Github Container registry |
| 220 | + uses: docker/login-action@v3 |
| 221 | + with: |
| 222 | + registry: ghcr.io |
| 223 | + username: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} |
| 224 | + password: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} |
| 225 | + |
| 226 | + - name: Pull Windows latest unstable container |
| 227 | + run: docker pull ${{ env.WINDOWS_UNSTABLE }} |
| 228 | + |
| 229 | + - name: Tag container as latest (stable) for Github Container registry |
| 230 | + run: docker tag ${{ env.WINDOWS_UNSTABLE }} ${{ env.WINDOWS_STABLE_GHCR }} |
| 231 | + |
| 232 | + - name: Publish latest stable container in ghcr.io |
| 233 | + run: docker push ${{ env.WINDOWS_STABLE_GHCR }} |
| 234 | + |
| 235 | + promote-linux: |
| 236 | + needs: [windows-tests, linux-tests] |
| 237 | + runs-on: ubuntu-latest |
| 238 | + name: Promote Linux container |
| 239 | + if: ${{ github.event.inputs.promote == 'true' || github.event_name == 'schedule' }} |
| 240 | + env: |
| 241 | + LINUX_UNSTABLE: ghcr.io/ansys/geometry:linux-latest-unstable |
| 242 | + LINUX_STABLE_GHCR: ghcr.io/ansys/geometry:linux-latest |
| 243 | + steps: |
| 244 | + - name: Login in Github Container registry |
| 245 | + uses: docker/login-action@v3 |
| 246 | + with: |
| 247 | + registry: ghcr.io |
| 248 | + username: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} |
| 249 | + password: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} |
| 250 | + |
| 251 | + - name: Pull Linux latest unstable container |
| 252 | + run: docker pull ${{ env.LINUX_UNSTABLE }} |
| 253 | + |
| 254 | + - name: Tag container as latest (stable) for Github Container registry |
| 255 | + run: docker tag ${{ env.LINUX_UNSTABLE }} ${{ env.LINUX_STABLE_GHCR }} |
| 256 | + |
| 257 | + - name: Publish latest stable container in ghcr.io |
| 258 | + run: docker push ${{ env.LINUX_STABLE_GHCR }} |
0 commit comments