Build docker-image-bases #36
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: Build docker-image-bases | |
'on': | |
push: | |
tags: | |
- 'v*' | |
schedule: | |
# every four months build automatically | |
- cron: '0 0 1 */4 *' | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
profile: [tx-default, tx-small, tx-full] | |
fail-fast: false | |
name: Build texlive using the ${{ matrix.profile }}-Profile | |
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 }}-base --build-arg target_profile=${{ matrix.profile }} . | |
- name: Test that the image installed correctly | |
run: | | |
docker run --rm lithie-${{ matrix.profile }}-base pdflatex --version | |
docker run --rm lithie-${{ matrix.profile }}-base latexmk --version | |
- name: Deploy the image | |
run: | | |
TAG="eagleoutice/lithie-${{ matrix.profile }}-base" | |
VERSION="$(date "+%Y%m%d")" | |
docker tag lithie-${{ matrix.profile }}-base ${TAG}:$VERSION | |
docker tag lithie-${{ matrix.profile }}-base ${TAG}:latest | |
docker images $TAG | |
echo ${{ secrets.DH_PASSWD }} | docker login -u ${{ secrets.DH_NAME }} --password-stdin | |
docker push $TAG |