Update docker-images #320
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |