hot girl cache
This commit is contained in:
parent
5f305ccaaa
commit
9edc4102b0
|
@ -4,11 +4,12 @@ on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
unit-test:
|
unit-test:
|
||||||
container:
|
container:
|
||||||
image: docker:dind
|
image: docker:dind--files-from manifest.txt
|
||||||
volumes:
|
volumes:
|
||||||
- /data/.cache/act:/data/.cache/act
|
- /data/.cache/act:/data/.cache/act
|
||||||
- /var/lib/docker/image:/var/lib/docker/image
|
- /var/lib/docker/image:/var/lib/docker/image
|
||||||
- /var/lib/docker/overlay2:/var/lib/docker/overlay2
|
- /var/lib/docker/overlay2:/var/lib/docker/overlay2
|
||||||
|
- /workspace/fedi-image-bot/bot-mastodon-image-uploader/target:/tmp
|
||||||
steps:
|
steps:
|
||||||
- name: Starting docker daemon
|
- name: Starting docker daemon
|
||||||
run: docker-init -- dockerd --host=unix:///var/run/docker.sock &
|
run: docker-init -- dockerd --host=unix:///var/run/docker.sock &
|
||||||
|
@ -18,18 +19,5 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Get access token from secret
|
- name: Get access token from secret
|
||||||
run: echo "${{ secrets.MASTODON_SECRET }}" > mastodon-data.toml
|
run: echo "${{ secrets.MASTODON_SECRET }}" > mastodon-data.toml
|
||||||
- name: Restore cached target
|
|
||||||
id: cache-restore
|
|
||||||
uses: actions/cache/restore@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
target/
|
|
||||||
key: ${{ runner.os }}-target
|
|
||||||
- name: Run tests on docker
|
- name: Run tests on docker
|
||||||
run: docker compose down -v && docker compose run bot t
|
run: docker compose down -v && docker compose run bot t
|
||||||
- name: Save target
|
|
||||||
uses: actions/cache/save@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
target/
|
|
||||||
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
|
|
|
@ -15,6 +15,7 @@ jobs:
|
||||||
- /data/.cache/act:/data/.cache/act
|
- /data/.cache/act:/data/.cache/act
|
||||||
- /var/lib/docker/image:/var/lib/docker/image
|
- /var/lib/docker/image:/var/lib/docker/image
|
||||||
- /var/lib/docker/overlay2:/var/lib/docker/overlay2
|
- /var/lib/docker/overlay2:/var/lib/docker/overlay2
|
||||||
|
- /workspace/fedi-image-bot/bot-mastodon-image-uploader/target:/tmp
|
||||||
steps:
|
steps:
|
||||||
- name: Starting docker daemon
|
- name: Starting docker daemon
|
||||||
run: docker-init -- dockerd --host=unix:///var/run/docker.sock &
|
run: docker-init -- dockerd --host=unix:///var/run/docker.sock &
|
||||||
|
@ -42,13 +43,6 @@ jobs:
|
||||||
registry: git.fai.st
|
registry: git.fai.st
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
password: ${{ secrets.DOCKER_PASS }}
|
||||||
- name: Restore cached target
|
|
||||||
id: cache-restore
|
|
||||||
uses: actions/cache/restore@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
target/
|
|
||||||
key: ${{ runner.os }}-target
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
|
@ -57,9 +51,3 @@ jobs:
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
- name: Save target
|
|
||||||
uses: actions/cache/save@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
target/
|
|
||||||
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
|
|
Loading…
Reference in New Issue