Browse Source

GH actions cache tfb dockerfile build (#8036)

* GH actions cache build tfb dockerfile

* [ci lang-only Pascal]

* Testing cache

* Testing cache [ci lang-only Pascal]

* Testing cache [ci lang-only Pascal]

* Testing cache [ci run-all]

* Testing dockerfile change [ci lang-only Pascal]

* Testing revert change in Dockerfile
[ci lang-only Pascal]
Joan Miquel 2 years ago
parent
commit
d382c07c51
1 changed files with 4 additions and 1 deletions
  1. 4 1
      .github/workflows/build.yml

+ 4 - 1
.github/workflows/build.yml

@@ -140,7 +140,10 @@ jobs:
           if [ "$RUN_TESTS" ]; then echo "Proceeding to run tests."; else echo 'Skipping test verification.'; fi
       - name: Build tfb dockerfile
         if: ${{ env.RUN_TESTS }}
-        run: docker build -t techempower/tfb - < ./Dockerfile;
+        uses: mattes/cached-docker-build-action@v1
+        with:
+          args: " --file ./Dockerfile --tag techempower/tfb ."
+          cache_key: "${{ hashFiles('./Dockerfile') }}"
       - name: Stop services
         # Stop services that would claim ports we may need
         run: |