diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2271095..e454c7f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: with: PLATFORMSH_ID: ${{ secrets.TEST_PLATFORMSH_ID }} PLATFORMSH_KEY: ${{ secrets.TEST_PLATFORMSH_KEY }} - ENVIRONMENT_NAME: main + ENVIRONMENT_NAME: master fail-deploy-test: name: "Testing on a environment that has a failed deployment" @@ -23,24 +23,23 @@ jobs: - uses: actions/checkout@v2 - uses: ./ - id: inactive_url + id: failed_url continue-on-error: true with: PLATFORMSH_ID: ${{ secrets.TEST_PLATFORMSH_ID }} PLATFORMSH_KEY: ${{ secrets.TEST_PLATFORMSH_KEY }} - ENVIRONMENT_NAME: main + ENVIRONMENT_NAME: master DEPLOY_STATUS_PATH: '/sites/default/files/mock-deploy-status' - name: Check for failure - if: ${{ steps.inactive_url.outputs.url }} + if: ${{ steps.failed_url.outputs.url }} uses: actions/github-script@v3 with: script: | core.setFailed('The test did not fail as expected.') - missing-url-test: - name: "Testing on a environment that that has no URL" + name: "Testing on a environment that does not exist" runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -51,8 +50,7 @@ jobs: with: PLATFORMSH_ID: ${{ secrets.TEST_PLATFORMSH_ID }} PLATFORMSH_KEY: ${{ secrets.TEST_PLATFORMSH_KEY }} - ENVIRONMENT_NAME: main - DEPLOY_STATUS_PATH: '/sites/default/files/xxx-deploy-status' + ENVIRONMENT_NAME: nonexistent - name: Check for failure if: ${{ steps.missing_url.outputs.url }} diff --git a/action.yml b/action.yml index ba2bebb..cdb7b02 100644 --- a/action.yml +++ b/action.yml @@ -27,9 +27,9 @@ inputs: required: false type: string - DEPLOY_WAIT_TIME: - description: "How long should we maximum wait for the deploy to work? If the branch doesnt exist in the PlatformSH GIT Remote, this is how long the action will take. Actually inactive environments get detected instantly. Default: 1000 seconds." - default: 1000 + PSH_DETECTION_WAIT: + description: "How long should we maximum wait for PSH to detect the push? If the branch doesnt exist in the PlatformSH GIT Remote, this is how long the action will take. Actually inactive environments get detected instantly. Default: 120 seconds." + default: 120 required: false type: integer @@ -53,7 +53,7 @@ runs: PLATFORMSH_ID: ${{ inputs.PLATFORMSH_ID }} PLATFORMSH_KEY: ${{ inputs.PLATFORMSH_KEY }} ENVIRONMENT_NAME: ${{ inputs.ENVIRONMENT_NAME }} - DEPLOY_WAIT_TIME: ${{ inputs.DEPLOY_WAIT_TIME }} + PSH_DETECTION_WAIT: ${{ inputs.PSH_DETECTION_WAIT }} ALLOW_CANCEL_CRON: ${{ inputs.ALLOW_CANCEL_CRON }} - name: Check latest deploy status