From a4ed36a345a8a8774ebb68051fe463854c0742fd Mon Sep 17 00:00:00 2001 From: Integralist Date: Fri, 8 Mar 2024 09:51:19 +0000 Subject: [PATCH] style: reformat indentation --- preview/action.yml | 88 ++++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/preview/action.yml b/preview/action.yml index efedf15..e8aef4c 100644 --- a/preview/action.yml +++ b/preview/action.yml @@ -18,46 +18,48 @@ outputs: value: ${{ steps.service-name.outputs.SERVICE_NAME }} runs: - using: "composite" - steps: - - uses: actions/checkout@v3 - # Download Fastly CLI - - name: Set up Fastly CLI - uses: fastly/compute-actions/setup@v4 - with: - token: ${{ inputs.github-token }} - cli_version: '10.2.4' - - run: yarn - shell: bash - - # Create a new Fastly Service name with the PR number appended - - name: Set service-name - id: service-name - run: echo "SERVICE_NAME=$(yq '.name' fastly.toml)-${{ github.event.number }}" >> "$GITHUB_OUTPUT" - shell: bash - - # Delete the Fastly Service - - if: github.event.action == 'closed' - run: fastly service delete --quiet --service-name ${{ steps.service-name.outputs.SERVICE_NAME }} --force --token ${{ inputs.fastly-api-token }} || true - shell: bash - - # Deploy to Fastly and let Fastly choose a subdomain of edgecompute.app to attach to the service - - if: github.event.action != 'closed' - run: | - fastly compute publish --verbose -i --token ${{ inputs.fastly-api-token }} --service-name ${{ steps.service-name.outputs.SERVICE_NAME }} - shell: bash - # Retrieve the newly created domain for the service and add it to the pull-request summary - - if: github.event.action != 'closed' - run: fastly domain list --quiet --version latest --json --service-name="${{ steps.service-name.outputs.SERVICE_NAME }}" --token ${{ inputs.fastly-api-token }} | jq -r '.[0].Name' - shell: bash - - - if: github.event.action != 'closed' - name: Set domain - shell: bash - id: domain - run: echo "DOMAIN=$(fastly domain list --quiet --version latest --json --service-name="${{ steps.service-name.outputs.SERVICE_NAME }}" --token ${{ inputs.fastly-api-token }} | jq -r '.[0].Name')" >> "$GITHUB_OUTPUT" - - - if: github.event.action != 'closed' - shell: bash - name: Add domain to summary - run: echo 'This pull-request has been deployed to Fastly and is available at 🚀' >> $GITHUB_STEP_SUMMARY + using: "composite" + steps: + - uses: actions/checkout@v4 + + # Download Fastly CLI + - name: Set up Fastly CLI + uses: fastly/compute-actions/setup@v5 + with: + token: ${{ inputs.github-token }} + cli_version: '10.8.4' + - run: yarn + shell: bash + + # Create a new Fastly Service name with the PR number appended + - name: Set service-name + id: service-name + run: echo "SERVICE_NAME=$(yq '.name' fastly.toml)-${{ github.event.number }}" >> "$GITHUB_OUTPUT" + shell: bash + + # Delete the Fastly Service + - if: github.event.action == 'closed' + run: fastly service delete --quiet --service-name ${{ steps.service-name.outputs.SERVICE_NAME }} --force --token ${{ inputs.fastly-api-token }} || true + shell: bash + + # Deploy to Fastly and let Fastly choose a subdomain of edgecompute.app to attach to the service + - if: github.event.action != 'closed' + run: | + fastly compute publish --verbose -i --token ${{ inputs.fastly-api-token }} --service-name ${{ steps.service-name.outputs.SERVICE_NAME }} + shell: bash + + # Retrieve the newly created domain for the service and add it to the pull-request summary + - if: github.event.action != 'closed' + run: fastly domain list --quiet --version latest --json --service-name="${{ steps.service-name.outputs.SERVICE_NAME }}" --token ${{ inputs.fastly-api-token }} | jq -r '.[0].Name' + shell: bash + + - if: github.event.action != 'closed' + name: Set domain + shell: bash + id: domain + run: echo "DOMAIN=$(fastly domain list --quiet --version latest --json --service-name="${{ steps.service-name.outputs.SERVICE_NAME }}" --token ${{ inputs.fastly-api-token }} | jq -r '.[0].Name')" >> "$GITHUB_OUTPUT" + + - if: github.event.action != 'closed' + shell: bash + name: Add domain to summary + run: echo 'This pull-request has been deployed to Fastly and is available at 🚀' >> $GITHUB_STEP_SUMMARY