Skip to content

Commit

Permalink
Update workflow on triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
marius.crisan authored and marius.crisan committed Dec 20, 2023
1 parent b3e3f7e commit 441f933
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions .github/workflows/03_deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,27 @@
name: Deploy cycler to PRODUCTION

on:
push:
branches:
- "mid_meas"

pull_request_review:
types:
- submitted

jobs:

publish-extra-pkg-prod:
# if: ${{ github.event_name == 'pull_request_review' &&
# github.event.review.state == 'approved' &&
# github.event.pull_request.head.ref == 'develop' &&
# github.event.pull_request.base.ref == 'master' }}
if: ${{ github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved' &&
github.event.pull_request.head.ref == 'develop' &&
github.event.pull_request.base.ref == 'master' }}
name: Build and publish cycler extra package
uses: ./.github/workflows/publish-extra-package.yml
with:
is-production: true

publish-cycler-pkg-prod:
# if: ${{ github.event_name == 'pull_request_review' &&
# github.event.review.state == 'approved' &&
# github.event.pull_request.head.ref == 'develop' &&
# github.event.pull_request.base.ref == 'master' }}
if: ${{ github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved' &&
github.event.pull_request.head.ref == 'develop' &&
github.event.pull_request.base.ref == 'master' }}
name: Build and publish cycler package
uses: ./.github/workflows/build_publish_package.yml
with:
Expand All @@ -50,15 +46,15 @@ jobs:
docker-user-arg: 69976 # wattrex
docker-group-arg: 69976 # wattrex

# publish-docker-image-db-sync:
# name: Publish db-sync docker image
# needs: publish-cycler-pkg-prod
# uses: WattRex/Battery-Experiments-Manager/.github/workflows/docker_image.yml@develop
# secrets:
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD_RALDEA }}
# with:
# dockerfile-path: ./devops/db_sync/Dockerfile.db_sync
# docker-repo-name: wattrex-cycler-db-sync
# is-develop: false
# docker-user: ${{ vars.DOCKER_USERNAME_RALDEA }}
publish-docker-image-db-sync:
name: Publish db-sync docker image
needs: publish-cycler-pkg-prod
uses: WattRex/Battery-Experiments-Manager/.github/workflows/docker_image.yml@develop
secrets:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD_RALDEA }}
with:
dockerfile-path: ./devops/db_sync/Dockerfile.db_sync
docker-repo-name: wattrex-cycler-db-sync
is-develop: false
docker-user: ${{ vars.DOCKER_USERNAME_RALDEA }}

0 comments on commit 441f933

Please sign in to comment.