This commit is contained in:
Lee 2023-03-27 21:45:24 +01:00
parent 28c1db0475
commit 6da7cda8b1

@ -3,7 +3,7 @@ name: Publish
on: on:
push: push:
branches: branches:
- 'master' - 'main'
jobs: jobs:
docker: docker:
@ -22,7 +22,7 @@ jobs:
uses: https://github.com/actions/cache/restore@v3 uses: https://github.com/actions/cache/restore@v3
with: with:
path: | path: |
/usr/bin/docker /usr/bin/docker
key: ${{ runner.os }}-docker key: ${{ runner.os }}-docker
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
@ -39,7 +39,7 @@ jobs:
- name: Cache Docker layers - name: Cache Docker layers
uses: https://github.com/actions/cache@v2 uses: https://github.com/actions/cache@v2
with: with:
path: /opt/hostedtoolcache/buildx path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }} key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: | restore-keys: |
${{ runner.os }}-buildx- ${{ runner.os }}-buildx-
@ -57,10 +57,10 @@ jobs:
push: true push: true
context: ./gitea-runner context: ./gitea-runner
tags: git.fascinated.cc/fascinated/gitea-runner:ubuntu-latest tags: git.fascinated.cc/fascinated/gitea-runner:ubuntu-latest
cache-from: type=local,src=/opt/hostedtoolcache/buildx cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/opt/hostedtoolcache/buildx-new cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Move cache - name: Move cache
run: | run: |
rm -rf /opt/hostedtoolcache/buildx rm -rf /tmp/.buildx-cache
mv /opt/hostedtoolcache/buildx-new /opt/hostedtoolcache/buildx mv /tmp/.buildx-cache-new /tmp/.buildx-cache