From 5b19bfaa6caf6e65f032eadd8018d7009089e0e6 Mon Sep 17 00:00:00 2001 From: Roman Andriushchenko Date: Thu, 30 May 2024 15:58:43 +0200 Subject: [PATCH] separate main and -learning release jobs --- .github/workflows/buildtest.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildtest.yml b/.github/workflows/buildtest.yml index 3c8220da3..68e9b71d2 100644 --- a/.github/workflows/buildtest.yml +++ b/.github/workflows/buildtest.yml @@ -33,8 +33,6 @@ jobs: uses: actions/checkout@v4 - name: Build paynt image from Dockerfile run: docker build -t ${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }} . --build-arg setup_args=${{ matrix.buildType.setupArgs }} --build-arg setup_args_pycarl=${{ matrix.buildType.setupArgs }} --build-arg no_threads=${NR_JOBS} - - name: Build paynt image with learner dependencies - run: docker build -t ${{ matrix.buildType.imageName }}-learner:${{ matrix.buildType.dockerTag }} . -f paynt-learner.dockerfile --build-arg paynt_base=${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }} - name: Login into docker # Only login if using master on original repo (and not for pull requests or forks) if: github.repository_owner == 'randriu' && github.ref == 'refs/heads/master' @@ -43,6 +41,26 @@ jobs: # Only deploy if using master on original repo (and not for pull requests or forks) if: github.repository_owner == 'randriu' && github.ref == 'refs/heads/master' run: docker push ${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }} + + deploy-learning: + name: Deploy on latest with learning dependencies (${{ matrix.buildType.name }}) + runs-on: ubuntu-latest + strategy: + matrix: + buildType: + - {name: "Release", imageName : "randriu/paynt", dockerTag: "latest", setupArgs: ""} + fail-fast: false + steps: + - name: Git clone + uses: actions/checkout@v4 + - name: Build paynt image from Dockerfile + run: docker build -t ${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }} . --build-arg setup_args=${{ matrix.buildType.setupArgs }} --build-arg setup_args_pycarl=${{ matrix.buildType.setupArgs }} --build-arg no_threads=${NR_JOBS} + - name: Build paynt image with learner dependencies + run: docker build -t ${{ matrix.buildType.imageName }}-learner:${{ matrix.buildType.dockerTag }} . -f paynt-learner.dockerfile --build-arg paynt_base=${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }} + - name: Login into docker + # Only login if using master on original repo (and not for pull requests or forks) + if: github.repository_owner == 'randriu' && github.ref == 'refs/heads/master' + run: echo '${{ secrets.STORMPY_CI_DOCKER_PASSWORD }}' | docker login -u randriu --password-stdin - name: Deploy paynt image with learner dependencies # Only deploy if using master on original repo (and not for pull requests or forks) if: github.repository_owner == 'randriu' && github.ref == 'refs/heads/master'