Upload Linux latest to Ansys Lab #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload Linux latest to Ansys Lab | |
on: | |
workflow_dispatch: | |
workflow_call: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
packages: read | |
env: | |
LINUX_STABLE_GHCR: ghcr.io/ansys/geometry:linux-latest | |
LINUX_STABLE_FUJI: azwepsifujiaksacr.azurecr.io/ansys/discovery/geometry:linux-latest | |
jobs: | |
linux-ansyslab: | |
name: Publish Linux latest image on AnsysLab | |
runs-on: | |
group: ansys-network | |
labels: [Linux, pygeometry] | |
steps: | |
- name: Login in Github Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Pull Linux latest stable container | |
run: docker pull ${{ env.LINUX_STABLE_GHCR }} | |
- name: Login in AnsysLab registry | |
uses: docker/login-action@v3 | |
with: | |
registry: azwepsifujiaksacr.azurecr.io | |
username: ${{ secrets.FUJI_USER }} | |
password: ${{ secrets.FUJI_TOKEN }} | |
- name: Tag container as latest (stable) for AnsysLab registry | |
run: docker tag ${{ env.LINUX_STABLE_GHCR }} ${{ env.LINUX_STABLE_FUJI }} | |
- name: Publish latest stable container in AnsysLab registry | |
run: docker push ${{ env.LINUX_STABLE_FUJI }} | |
- name: Remove images (free space) | |
run: docker image rm ${{ env.LINUX_STABLE_FUJI }} ${{ env.LINUX_STABLE_GHCR }} |