diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13ad49a0ac609fe30beeae2850fc31b760538823..e3dd68c7fd92814cbad6ff4adb8169616645a146 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,13 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to Private registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ${{ secrets.PRIVATEHUB_HOSTNAME }} + username: ${{ secrets.PRIVATEHUB_USERNAME }} + password: ${{ secrets.PRIVATEHUB_TOKEN }} - uses: webfactory/ssh-agent@v0.7.0 with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} @@ -64,6 +71,8 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=registry,ref=${{ secrets.PRIVATEHUB_HOSTNAME }}/${{ secrets.PRIVATEHUB_USERNAME }}/${{ env.REPOSITORY_NAME }}:buildcache + cache-to: type=registry,ref=${{ secrets.PRIVATEHUB_HOSTNAME }}/${{ secrets.PRIVATEHUB_USERNAME }}/${{ env.REPOSITORY_NAME }}:buildcache,mode=max - name: Update repo description uses: peter-evans/dockerhub-description@v3 with: