-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.38 KB
/
build_docker.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
42
43
44
name: Update docker-images
'on':
push:
branches:
- master
- main
schedule:
# every monday at night
- cron: '0 1 * * 1'
workflow_dispatch:
jobs:
build:
strategy:
matrix:
profile: [tx-default] # , tx-small, tx-full]
fail-fast: false
name: Build container using the ${{ matrix.profile }}-base-image
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
with:
lfs: false
submodules: false
- name: Build the image
run: |
docker build -t lithie-${{ matrix.profile }} -f Dockerfile-Update --build-arg target_profile=${{ matrix.profile }} .
- name: Test that the image installed correctly
run: |
docker run --rm lithie-${{ matrix.profile }} pdflatex --version
docker run --rm lithie-${{ matrix.profile }} latexmk --version
docker run --rm lithie-${{ matrix.profile }} sltx version
- name: Deploy the image
run: |
TAG="eagleoutice/lithie-${{ matrix.profile }}"
VERSION="$(date "+%Y%m%d")"
docker tag lithie-${{ matrix.profile }} ${TAG}:$VERSION
docker tag lithie-${{ matrix.profile }} ${TAG}:latest
docker images $TAG
echo ${{ secrets.DH_PASSWD }} | docker login -u ${{ secrets.DH_NAME }} --password-stdin
docker push $TAG