|
40 | 40 | [[ "${{ steps.changes.outputs.files }}" =~ package\.json ]] && echo "package_json=true" >> $GITHUB_ENV; |
41 | 41 | [[ "${{ steps.changes.outputs.files }}" =~ \.github/|actions/ ]] && echo "github_actions=true" >> $GITHUB_ENV; |
42 | 42 | [[ "${{ contains(github.event.head_commit.message, '[Code submission]') }}" == "true" || "${{ contains(github.head_ref, 'code-submission') }}" == "true" ]] && echo "code_submission=true" >> $GITHUB_ENV; |
| 43 | + $pull_request && echo "heroku_review_app_url=https://coderush-pr-$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH").herokuapp.com" >> $GITHUB_ENV; |
43 | 44 | exit 0; |
44 | 45 | - name: 'Setup other env variables' |
45 | 46 | # env variables are available only in next steps |
|
55 | 56 | echo "github_actions=$github_actions"; |
56 | 57 | echo "all=$all"; |
57 | 58 | echo "code_submission=$code_submission"; |
58 | | - echo "commit_msg=${{ github.event.head_commit.message }}"; |
| 59 | + echo "heroku_review_app_url=$heroku_review_app_url"; |
59 | 60 | echo "base_ref=${{ github.base_ref }}"; |
60 | 61 | echo "head_ref=${{ github.head_ref }}"; |
61 | 62 |
|
|
81 | 82 | - name: Set API URL for testing |
82 | 83 | if: (env.all || env.frontend) && !env.live |
83 | 84 | run: | |
84 | | - echo "VUE_APP_API_URL=https://coderush-pr-$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH").herokuapp.com" > .env.production |
| 85 | + echo "VUE_APP_API_URL=$HEROKU_REVIEW_APP_URL" > .env.production |
85 | 86 | - name: Vue build |
86 | 87 | if: env.all || env.frontend |
87 | 88 | run: | |
@@ -130,14 +131,14 @@ jobs: |
130 | 131 | - name: Accept code submission |
131 | 132 | if: env.code_submission && env.live |
132 | 133 | run: | |
133 | | - node actions/add-code-submission-to-db.js && curl -X POST ${{ secrets.DB_CACHE_UPDATE_URL }} |
| 134 | + node actions/add-code-submission-to-db.js && curl -X POST https://api.coderush.xyz${{ secrets.DB_CACHE_UPDATE_URL }} |
134 | 135 | env: |
135 | 136 | TOKEN: ${{ secrets.GITHUB_TOKEN }} |
136 | 137 | FAUNA_KEY: ${{ secrets.FAUNA_KEY }} |
137 | 138 | - name: Accept code submission on dev database |
138 | 139 | if: env.code_submission && !env.live |
139 | 140 | run: | |
140 | | - node actions/add-code-submission-to-db.js |
| 141 | + node actions/add-code-submission-to-db.js && curl -X POST $heroku_review_app_url${{ secrets.DB_CACHE_UPDATE_URL }} |
141 | 142 | env: |
142 | 143 | TOKEN: ${{ secrets.GITHUB_TOKEN }} |
143 | 144 | FAUNA_KEY: ${{ secrets.FAUNA_DEV_KEY }} |
|
0 commit comments