-
Notifications
You must be signed in to change notification settings - Fork 21
41 lines (33 loc) · 1.24 KB
/
dockercache.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This workflow runs weekly. Its purpose is to rebuild the base Docker images
# to get the latest security updates and versions of Python dependencies
# (otherwise the regular CI workflow will continue to use the existing base
# images).
name: Refresh Docker cache
on:
workflow_dispatch:
schedule:
- cron: "0 4 * * MON"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the dependencies Docker image without caching
run: |
DOCKER_BUILDKIT=1 docker build \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--target dependencies \
--no-cache \
--tag lsstsqre/lsst-texmf:dependencies .
- name: Build the base Docker image (for pushing as a separate tag)
run: |
DOCKER_BUILDKIT=1 docker build \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--target base \
--tag lsstsqre/lsst-texmf:base .
- name: Log into Docker Hub
run: echo ${{ secrets.DOCKER_TOKEN }} | docker login --username ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Push Docker images
run: |
docker push lsstsqre/lsst-texmf:base
docker push lsstsqre/lsst-texmf:dependencies