From 5b16207302ce56c092d49ecd3f51091334bc41dd Mon Sep 17 00:00:00 2001 From: Roman Andriushchenko Date: Fri, 20 Sep 2024 11:10:50 +0200 Subject: [PATCH] update github workflow --- .github/workflows/buildtest.yml | 51 +++++++++++++++++---------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/buildtest.yml b/.github/workflows/buildtest.yml index 4aaf1ae27..a7d9bcc24 100644 --- a/.github/workflows/buildtest.yml +++ b/.github/workflows/buildtest.yml @@ -5,6 +5,7 @@ on: push: branches: - master + - mdp schedule: # run weekly - cron: '0 10 * * 3' @@ -28,6 +29,7 @@ jobs: buildType: - {name: "Release", imageName : "randriu/paynt", dockerTag: "latest", setupArgs: ""} fail-fast: false + if: github.ref == 'refs/heads/master' steps: - name: Git clone uses: actions/checkout@v4 @@ -35,33 +37,32 @@ jobs: 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: 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' + if: github.repository_owner == 'randriu' run: echo '${{ secrets.STORMPY_CI_DOCKER_PASSWORD }}' | docker login -u randriu --password-stdin - name: Deploy paynt image # 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' + if: github.repository_owner == 'randriu' run: docker push ${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }} - # deploy-learning: - # name: Deploy on latest with learning dependencies (${{ matrix.buildType.name }}) - # runs-on: ubuntu-latestx - # 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' - # run: docker push ${{ matrix.buildType.imageName }}-learner:${{ matrix.buildType.dockerTag }} + deploy-mdp: + name: Deploy on latest (mdp) (${{ matrix.buildType.name }}) + runs-on: ubuntu-latest + strategy: + matrix: + buildType: + - {name: "Release", imageName : "randriu/paynt", dockerTag: "mdp", setupArgs: ""} + fail-fast: false + if: github.ref == 'refs/heads/mdp' + 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: Login into docker + # Only login if using mdp on original repo (and not for pull requests or forks) + if: github.repository_owner == 'randriu' + run: echo '${{ secrets.STORMPY_CI_DOCKER_PASSWORD }}' | docker login -u randriu --password-stdin + - name: Deploy paynt image + # Only deploy if using mdp on original repo (and not for pull requests or forks) + if: github.repository_owner == 'randriu' + run: docker push ${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }}