diff --git a/.github/workflows/build-latest.yml b/.github/workflows/build-latest.yml index 0eb13ce..847f25e 100644 --- a/.github/workflows/build-latest.yml +++ b/.github/workflows/build-latest.yml @@ -23,14 +23,6 @@ jobs: with: ref: main - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.docker - key: ${{ runner.os }}-docker-${{ hashFiles('**/Dockerfile') }} - restore-keys: | - ${{ runner.os }}-docker- - - name: Login to GitHub Container Registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin @@ -52,15 +44,18 @@ jobs: platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true tags: ghcr.io/insertdisc/pattrmm:latest - cache-from: type=local,src=/tmp/.docker - cache-to: type=local,dest=/tmp/.docker + cache-from: type=gha + cache-to: type=gha,mode=max - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - + + - name: Pull image from GitHub Container Registry + run: docker pull ghcr.io/insertdisc/pattrmm:latest + - name: Tag for Docker Hub run: | docker tag ghcr.io/insertdisc/pattrmm:latest ${{ secrets.DOCKER_HUB_USERNAME }}/pattrmm:latest @@ -68,3 +63,4 @@ jobs: - name: Push to Docker Hub run: | docker push ${{ secrets.DOCKER_HUB_USERNAME }}/pattrmm:latest +