Merge pull request #79 from WattRex/app_man #57
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
# This workflow deploy system tools to production environment | ||
name: Deploy cycler to PRODUCTION | ||
on: | ||
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' }} | ||
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' }} | ||
name: Build and publish cycler package | ||
uses: ./.github/workflows/build_publish_package.yml | ||
with: | ||
package-name: "${{ vars.CYCLER_PACKAGE_NAME }}" | ||
package-path: "code/cycler" | ||
source-path: "code/cycler/src/${{ vars.CYCLER_PACKAGE_NAME }}" | ||
is-production: true | ||
publish-docker-image-cycler: | ||
name: Publish cycler docker image | ||
needs: [ publish-cycler-pkg-prod, publish-extra-pkg-prod ] | ||
uses: WattRex/Battery-Experiments-Manager/.github/workflows/docker_image.yml@develop | ||
secrets: | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD_RALDEA }} | ||
with: | ||
dockerfile-path: ./devops/cycler/Dockerfile.cycler | ||
docker-repo-name: wattrex-cycler-node | ||
is-develop: false | ||
docker-user: ${{ vars.DOCKER_USERNAME_RALDEA }} | ||
docker-user-arg: 69976 # wattrex | ||
docker-group-arg: 69976 # wattrex | ||
docker-target: cycler_prod | ||
publish-docker-image-db-sync: | ||
name: Publish db-sync docker image | ||
needs: [ publish-cycler-pkg-prod, publish-extra-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 }} | ||
docker-user-arg: 69976 # wattrex | ||
docker-group-arg: 69976 # wattrex | ||
docker-target: db_sync_prod | ||
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 }} | ||