Change cache saving
This commit is contained in:
parent
46494cde5c
commit
982914002c
2 changed files with 8 additions and 8 deletions
14
.github/workflows/flaskr-ci.yaml
vendored
14
.github/workflows/flaskr-ci.yaml
vendored
|
|
@ -1,7 +1,5 @@
|
||||||
name: Build Flaskr App
|
name: Build Flaskr App
|
||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -40,7 +38,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Job vars and prep
|
- name: Job vars and prep
|
||||||
id: vars
|
|
||||||
# Use bash string manipulation to create vars
|
# Use bash string manipulation to create vars
|
||||||
# Note runner context isn't available in job.env, so use it here
|
# Note runner context isn't available in job.env, so use it here
|
||||||
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#context-availability
|
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#context-availability
|
||||||
|
|
@ -78,7 +75,12 @@ jobs:
|
||||||
# the cache will keep growing indefinitely, past the 10GB max
|
# the cache will keep growing indefinitely, past the 10GB max
|
||||||
# https://github.com/docker/build-push-action/issues/252
|
# https://github.com/docker/build-push-action/issues/252
|
||||||
# https://github.com/moby/buildkit/issues/1896
|
# https://github.com/moby/buildkit/issues/1896
|
||||||
|
# - name: Only persist the new cache layers
|
||||||
|
# run: |
|
||||||
|
# rm -rf ${CACHE}
|
||||||
|
# mv ${NEW_CACHE} ${CACHE}
|
||||||
- name: Only persist the new cache layers
|
- name: Only persist the new cache layers
|
||||||
run: |
|
uses: actions/cache/save@v3
|
||||||
rm -rf ${CACHE}
|
with:
|
||||||
mv ${NEW_CACHE} ${CACHE}
|
path: ${{ env.NEW_CACHE }}
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
FROM python:3.11.2-alpine3.17
|
FROM python:3.11.2-alpine3.17
|
||||||
|
|
||||||
|
|
||||||
COPY . "/tutorial"
|
COPY . "/tutorial"
|
||||||
WORKDIR /tutorial
|
WORKDIR /tutorial
|
||||||
|
|
||||||
RUN pip install .
|
RUN pip install .
|
||||||
RUN flask --app=flaskr init-db
|
RUN flask --app=flaskr init-db
|
||||||
RUN touch blah
|
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue