From f0a80781f43a91713f441c7d638f36485f4c7126 Mon Sep 17 00:00:00 2001 From: thenav56 Date: Tue, 11 Jul 2023 16:42:16 +0545 Subject: [PATCH] Update GH CI actions --- .github/workflows/ci.yml | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 953daf3f7e..006fa92c1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: name: ๐Ÿšด Build + Test ๐Ÿšด # Match the name below (8398a7/action-slack). runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@master - name: ๐Ÿณ Prepare Docker id: prep @@ -24,17 +24,8 @@ jobs: id: buildx uses: docker/setup-buildx-action@master - - name: ๐Ÿณ Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.ref }} - restore-keys: | - ${{ runner.os }}-buildx-refs/develop - ${{ runner.os }}-buildx- - - name: ๐Ÿณ Build image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . builder: ${{ steps.buildx.outputs.name }} @@ -43,8 +34,9 @@ jobs: load: true target: worker # this has all the dep tags: ${{ steps.prep.outputs.tagged_image }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new + # Using experimental GH api: https://docs.docker.com/build/ci/github-actions/cache/#cache-backend-api + cache-from: type=gha + cache-to: type=gha,mode=max - name: ๐Ÿ•ฎ Validate latest graphql schema. env: @@ -67,7 +59,7 @@ jobs: } - name: ๐Ÿคž Run Test ๐Ÿงช & Publish coverage to code climate - uses: paambaati/codeclimate-action@v2.7.5 + uses: paambaati/codeclimate-action@v5.0.0 env: CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_ID }} DOCKER_IMAGE_SERVER: ${{ steps.prep.outputs.tagged_image }} @@ -77,19 +69,10 @@ jobs: ${{github.workspace}}/coverage/coverage.xml:coverage.py - name: Publish coverage to code cov - uses: codecov/codecov-action@v2 - - # Temp fix - # https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#github-cache - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: ๐Ÿณ Move docker cache (๐Ÿง™ Hack fix) - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache + uses: codecov/codecov-action@v3 - name: Deploy coverage to GH Pages ๐Ÿš€ - uses: JamesIves/github-pages-deploy-action@4.1.4 + uses: JamesIves/github-pages-deploy-action@v4 if: github.ref == 'refs/heads/develop' && github.event_name == 'push' with: branch: gh-pages