diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index d144928e8..e6bc213fe 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -35,11 +35,16 @@ jobs: docker build --target community -t "ocelotsocialnetwork/neo4j-community:test" neo4j/ docker save "ocelotsocialnetwork/neo4j-community:test" > /tmp/neo4j.tar - - name: Upload Artifact - uses: actions/upload-artifact@v3 + - name: Get pr number + id: pr + uses: 8BitJonny/gh-get-current-pr@2.2.0 + + - name: Cache docker images + id: cache-neo4j + uses: actions/cache/save@v3.3.1 with: - name: docker-neo4j-image path: /tmp/neo4j.tar + key: backend-neo4j-cache-pr${{ steps.pr.outputs.number }} build_test_backend: name: Docker Build Test - Backend @@ -53,13 +58,13 @@ jobs: - name: backend | Build 'test' image run: | docker build --target test -t "ocelotsocialnetwork/backend:test" backend/ - docker save "ocelotsocialnetwork/backend:test" > /tmp/backend.tar + docker save "ocelotsocialnetwork/backend:test" > /tmp/images/backend.tar - name: Upload Artifact uses: actions/upload-artifact@v3 with: name: docker-backend-test - path: /tmp/backend.tar + path: /tmp/images/backend.tar lint_backend: name: Lint Backend