diff --git a/.github/workflows/python-app-ci.yml b/.github/workflows/python-app-ci.yml index 2df15d859..c196f8086 100644 --- a/.github/workflows/python-app-ci.yml +++ b/.github/workflows/python-app-ci.yml @@ -20,7 +20,7 @@ jobs: os: [ macos-latest, ubuntu-latest ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.10.4 uses: actions/setup-python@v2 with: @@ -46,7 +46,7 @@ jobs: coverage: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.10.4 uses: actions/setup-python@v2 with: @@ -67,7 +67,7 @@ jobs: scripts: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.10.4 uses: actions/setup-python@v2 with: @@ -89,7 +89,7 @@ jobs: GITHUB_REPOSITORY_NAME: ${{ steps.cache.outputs.GITHUB_REPOSITORY_NAME }} steps: - name: Git checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set outputs id: cache run: | @@ -106,12 +106,28 @@ jobs: if: github.event_name == 'push' && github.ref == 'refs/heads/master' steps: - name: Git checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Set up Docker buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Cache Docker Layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: keri-${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + keri-${{ runner.os }}-buildx- - name: interop run: | echo ${{ secrets.CR_PAT }} | docker login ghcr.io --username ${{ secrets.CR_USER }} --password-stdin - docker build -f .github/workflows/interop/Dockerfile --no-cache -t ${{ env.GITHUB_REPOSITORY_NAME }}/keripy-interop:${{ env.CACHE_KEY_INTEROP }} . + docker buildx build --platform linux/amd64 --cache-from type=local,src=/tmp/.buildx-cache --cache-to type=local,dest=/tmp/.buildx-cache-new,mode=max -f .github/workflows/interop/Dockerfile -t ${{ env.GITHUB_REPOSITORY_NAME }}/keripy-interop:${{ env.CACHE_KEY_INTEROP }} . docker tag ${{ env.GITHUB_REPOSITORY_NAME }}/keripy-interop:${{ env.CACHE_KEY_INTEROP }} ghcr.io/${{ env.GITHUB_REPOSITORY_NAME }}/keripy-interop:latest docker push ghcr.io/${{ env.GITHUB_REPOSITORY_NAME }}/keripy-interop:latest mkdir -p ${GITHUB_WORKSPACE}/cache touch ${GITHUB_WORKSPACE}/cache/${{ env.CACHE_KEY_INTEROP }} + + - name: Move Docker cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache \ No newline at end of file