From 1da2b1e9e40629712806d04e2eaf31d455de71a8 Mon Sep 17 00:00:00 2001 From: nataliepina Date: Tue, 6 Dec 2022 14:53:29 -0600 Subject: [PATCH] ci: update uffizzi preview actions --- .github/workflows/uffizzi-build.yml | 14 ++++++-------- .github/workflows/uffizzi-preview.yml | 7 +++---- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/uffizzi-build.yml b/.github/workflows/uffizzi-build.yml index 57004e87b..0a8fee532 100644 --- a/.github/workflows/uffizzi-build.yml +++ b/.github/workflows/uffizzi-build.yml @@ -1,10 +1,9 @@ name: Build PR Image on: pull_request: - types: [opened,synchronize,reopened,closed] + types: [opened, synchronize, reopened, closed] jobs: - build-application: name: Build and Push `f-ui-kit` runs-on: ubuntu-latest @@ -15,7 +14,7 @@ jobs: - name: Checkout git repo uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v2 - name: Generate UUID image name id: uuid run: echo "UUID_TAG_APP=$(uuidgen)" >> $GITHUB_ENV @@ -40,7 +39,7 @@ jobs: name: Render Docker Compose File # Pass output of this workflow to another triggered by `workflow_run` event. runs-on: ubuntu-latest - needs: + needs: - build-application outputs: compose-file-cache-key: ${{ steps.hash.outputs.hash }} @@ -61,10 +60,10 @@ jobs: path: docker-compose.rendered.yml retention-days: 2 - name: Serialize PR Event to File - run: | + run: | cat << EOF > event.json - ${{ toJSON(github.event) }} - + ${{ toJSON(github.event) }} + EOF - name: Upload PR Event as Artifact uses: actions/upload-artifact@v3 @@ -87,4 +86,3 @@ jobs: name: preview-spec path: event.json retention-days: 2 - diff --git a/.github/workflows/uffizzi-preview.yml b/.github/workflows/uffizzi-preview.yml index 0feabe367..bdb5357ad 100644 --- a/.github/workflows/uffizzi-preview.yml +++ b/.github/workflows/uffizzi-preview.yml @@ -9,7 +9,6 @@ on: branches-ignore: - "main" - jobs: cache-compose-file: name: Cache Compose File @@ -18,7 +17,7 @@ jobs: compose-file-cache-key: ${{ env.COMPOSE_FILE_HASH }} pr-number: ${{ env.PR_NUMBER }} steps: - - name: 'Download artifacts' + - name: "Download artifacts" # Fetch output (zip archive) from the workflow run that triggered this workflow. uses: actions/github-script@v6 with: @@ -39,7 +38,7 @@ jobs: }); let fs = require('fs'); fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/preview-spec.zip`, Buffer.from(download.data)); - - name: 'Unzip artifact' + - name: "Unzip artifact" run: unzip preview-spec.zip - name: Read Event into ENV run: | @@ -72,7 +71,7 @@ jobs: name: Use Remote Workflow to Preview on Uffizzi needs: - cache-compose-file - uses: UffizziCloud/preview-action/.github/workflows/reusable.yaml@v2.6.1 + uses: UffizziCloud/preview-action/.github/workflows/reusable.yaml@v2 with: # If this workflow was triggered by a PR close event, cache-key will be an empty string # and this reusable workflow will delete the preview deployment.