forked from Hg/htlle-da-vorlage
added caching
This commit is contained in:
parent
b7faab0dcd
commit
e5b7874031
@ -16,9 +16,31 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build diploma thesis
|
||||
- name: Cache Docker image
|
||||
id: cache-docker
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/.docker
|
||||
key: ${{ runner.os }}-docker-${{ hashFiles('**/HTLLE-DA-Vorlage/tools/docker/Dockerfile') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-docker-
|
||||
|
||||
- name: Create Docker cache directory
|
||||
if: steps.cache-docker.outputs.cache-hit != 'true'
|
||||
run: mkdir -p /tmp/.docker
|
||||
|
||||
- name: Load cached Docker image
|
||||
if: steps.cache-docker.outputs.cache-hit == 'true'
|
||||
run: docker load -i /tmp/.docker/image.tar
|
||||
|
||||
- name: Pull Docker image
|
||||
if: steps.cache-docker.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
docker run --rm -v ${{ github.workspace }}/Diplomarbeit:/workspace bytebang/htlle-da-env
|
||||
docker pull bytebang/htlle-da-env
|
||||
docker save bytebang/htlle-da-env -o /tmp/.docker/image.tar
|
||||
|
||||
- name: Build diploma thesis
|
||||
run: docker run -v ${{ github.workspace }}/Diplomarbeit:/workspace bytebang/htlle-da-env
|
||||
|
||||
- name: Send diploma thesis
|
||||
uses: dawidd6/action-send-mail@v4
|
||||
|
Loading…
Reference in New Issue
Block a user