[CI Improvements] - Build mainnet environment for PRs (#2047)

* Enable mainnet build on PRs

Enable EWC build on release PRs
This commit is contained in:
Daniel Sanchez 2021-03-16 16:22:49 +01:00 committed by GitHub
parent f1547c1188
commit 03397f9e8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 3 deletions

View File

@ -1,10 +1,13 @@
name: Deploy to EWC network name: Deploy to EWC network
# Run on pushes to master # Run on pushes to master or PRs to master
on: on:
push: push:
branches: branches:
- master - master
pull_request:
branches:
- master
# Launches build when release is published # Launches build when release is published
release: release:
types: [published] types: [published]

View File

@ -1,7 +1,9 @@
name: Deploy to Mainnet network name: Deploy to Mainnet network
# Run on pushes to master # Run on pushes to master or PRs
on: on:
# Pull request hook without any config. Launches for every pull request
pull_request:
push: push:
branches: branches:
- master - master
@ -84,7 +86,27 @@ jobs:
aws-region: ${{ secrets.AWS_DEFAULT_REGION }} aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
# Script to deploy Pull Requests # Script to deploy Pull Requests
# Mainnet build is never created in Pull Requests - run: bash ./scripts/github/deploy_pull_request.sh
if: success() && github.event.number
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
PR_NUMBER: ${{ github.event.number }}
REVIEW_BUCKET_NAME: ${{ secrets.AWS_REVIEW_BUCKET_NAME }}
REACT_APP_NETWORK: ${{ env.REACT_APP_NETWORK }}
TRAVIS_TAG: ${{ github.event.release.tag_name }}
- name: 'PRaul: Comment PR with app URLs'
uses: mshick/add-pr-comment@v1
with:
message: |
* [Safe Multisig app ${{ env.REACT_APP_NETWORK }}](${{ env.REVIEW_FEATURE_URL }}/${{ env.REACT_APP_NETWORK }}/app/)
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'
allow-repeats: true
if: success() && github.event.number
env:
REVIEW_FEATURE_URL: https://pr${{ github.event.number }}--${{ env.REPO_NAME_ALPHANUMERIC }}.review.gnosisdev.com
# Script to deploy to development environment # Script to deploy to development environment
# Mainnet build is never created in development branch # Mainnet build is never created in development branch