name: Pre Release on: push: branches: - master jobs: build-image-for-cache: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Docker Buildx uses: crazy-max/ghaction-docker-buildx@v3 - name: Cache Docker layers uses: actions/cache@v2 id: cache with: path: /tmp/.buildx-cache key: ${{ runner.OS }}-buildx-${{ hashFiles('**/yarn.lock') }}-default restore-keys: | ${{ runner.os }}-buildx- - name: Build Docker Image run: | docker buildx build \ --cache-from "type=local,src=/tmp/.buildx-cache" \ --cache-to "type=local,dest=/tmp/.buildx-cache" \ --platform linux/amd64 \ --load \ --file ./docker/Dockerfile .