From 7fb7e4c9930c23369ba4d6d417b19f9d643c9caa Mon Sep 17 00:00:00 2001 From: Milkman337 Date: Thu, 15 Aug 2024 16:12:12 +0000 Subject: [PATCH] Update .gitea/workflows/node-npm.yaml (#8) Reviewed-on: https://git.kjan.de/actions/runner-images/pulls/8 Co-authored-by: Milkman337 Co-committed-by: Milkman337 --- .gitea/workflows/node-npm.yaml | 20 +++++++++++++++++++- .gitea/workflows/node-ssh.yaml | 20 +++++++++++++++++++- .gitea/workflows/php-8.2.yaml | 20 +++++++++++++++++++- .gitea/workflows/php-deployer.yaml | 20 +++++++++++++++++++- .gitea/workflows/rust-node.yaml | 18 ++++++++++++++++++ 5 files changed, 94 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/node-npm.yaml b/.gitea/workflows/node-npm.yaml index 964b36c..25a9718 100644 --- a/.gitea/workflows/node-npm.yaml +++ b/.gitea/workflows/node-npm.yaml @@ -35,11 +35,29 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Cache Docker layers + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-node-npm-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-node-npm- + - name: Build and push uses: https://git.kjan.de/actions/build-push-action@v6 with: + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max context: ./images/actions/node-npm push: ${{ github.ref == 'refs/heads/main' }} tags: | git.kjan.de/actions/node-npm:latest - git.kjan.de/actions/node-npm:${{ gitea.run_number }} + git.kjan.de/actions/node-npm:${{ gitea.run_number }} + + - # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache diff --git a/.gitea/workflows/node-ssh.yaml b/.gitea/workflows/node-ssh.yaml index 0166f1a..72984e9 100644 --- a/.gitea/workflows/node-ssh.yaml +++ b/.gitea/workflows/node-ssh.yaml @@ -35,11 +35,29 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Cache Docker layers + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-node-ssh-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-node-ssh- + - name: Build and push uses: https://git.kjan.de/actions/build-push-action@v6 with: + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max context: ./images/actions/node-ssh push: ${{ github.ref == 'refs/heads/main' }} tags: | git.kjan.de/actions/node-ssh:latest - git.kjan.de/actions/node-ssh:${{ gitea.run_number }} + git.kjan.de/actions/node-ssh:${{ gitea.run_number }} + + - # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache diff --git a/.gitea/workflows/php-8.2.yaml b/.gitea/workflows/php-8.2.yaml index d7cf5a4..d34e463 100644 --- a/.gitea/workflows/php-8.2.yaml +++ b/.gitea/workflows/php-8.2.yaml @@ -35,12 +35,30 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Cache Docker layers + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-php-8-2-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-php-8-2- + - name: Build and push uses: https://git.kjan.de/actions/build-push-action@v6 with: + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max context: ./images/actions/php-8.2 push: ${{ github.ref == 'refs/heads/main' }} tags: | git.kjan.de/actions/php-8.2:latest - git.kjan.de/actions/php-8.2:${{ gitea.run_number }} + git.kjan.de/actions/php-8.2:${{ gitea.run_number }} + + - # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache diff --git a/.gitea/workflows/php-deployer.yaml b/.gitea/workflows/php-deployer.yaml index 03eee74..abb3ede 100644 --- a/.gitea/workflows/php-deployer.yaml +++ b/.gitea/workflows/php-deployer.yaml @@ -35,11 +35,29 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Cache Docker layers + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-php-deployer-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-php-deployer- + - name: Build and push uses: https://git.kjan.de/actions/build-push-action@v6 with: + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max context: ./images/actions/php-deployer push: ${{ github.ref == 'refs/heads/main' }} tags: | git.kjan.de/actions/php-deployer:latest - git.kjan.de/actions/php-deployer:${{ gitea.run_number }} + git.kjan.de/actions/php-deployer:${{ gitea.run_number }} + + - # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache diff --git a/.gitea/workflows/rust-node.yaml b/.gitea/workflows/rust-node.yaml index 860a5f1..d96fd57 100644 --- a/.gitea/workflows/rust-node.yaml +++ b/.gitea/workflows/rust-node.yaml @@ -35,11 +35,29 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Cache Docker layers + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-rust-node-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-rust-node- + - name: Build and push uses: https://git.kjan.de/actions/build-push-action@v6 with: + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max context: ./images/actions/rust-node push: ${{ github.ref == 'refs/heads/main' }} tags: | git.kjan.de/actions/rust-node:latest git.kjan.de/actions/rust-node:${{ gitea.run_number }} + + - # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache