diff options
author | 2021-10-10 14:42:40 +0300 | |
---|---|---|
committer | 2021-10-10 14:52:22 +0300 | |
commit | 79259eb856ea2847a61c44dee4eb03f557a7e4f1 (patch) | |
tree | d54cd0b3706a4d057763e256aab66df0161642af /.github | |
parent | Fixes Caching On Docker Build (diff) |
Merges Dockerfiles
Merges the normal dockerfile with the static build one to reduce
duplication.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/static-preview.yaml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/.github/workflows/static-preview.yaml b/.github/workflows/static-preview.yaml index 970fad99..06192f02 100644 --- a/.github/workflows/static-preview.yaml +++ b/.github/workflows/static-preview.yaml @@ -38,7 +38,6 @@ jobs: if: github.ref == 'refs/heads/main' with: context: . - file: ./static-builds/Dockerfile push: true cache-from: type=registry,ref=ghcr.io/python-discord/static-site:latest cache-to: type=inline @@ -47,12 +46,14 @@ jobs: ghcr.io/python-discord/static-site:${{ steps.sha_tag.outputs.tag }} build-args: | git_sha=${{ github.sha }} + STATIC_BUILD=TRUE - name: Extract Build From Docker Image (Main) if: github.ref == 'refs/heads/main' run: | mkdir docker_build \ - && docker run --name site ghcr.io/python-discord/static-site:${{ steps.sha_tag.outputs.tag }} \ + && docker run --entrypoint /bin/echo --name site \ + ghcr.io/python-discord/static-site:${{ steps.sha_tag.outputs.tag }} \ && docker cp site:/app docker_build/ # Build directly to a local folder @@ -61,12 +62,12 @@ jobs: if: github.ref != 'refs/heads/main' with: context: . - file: ./static-builds/Dockerfile push: false cache-from: type=registry,ref=ghcr.io/python-discord/static-site:latest outputs: type=local,dest=docker_build/ build-args: | git_sha=${{ github.sha }} + STATIC_BUILD=TRUE - name: Upload Build uses: actions/upload-artifact@v2 |