From 4736308a892acb0d1d767b8df752999c9fd6cfda Mon Sep 17 00:00:00 2001 From: zydou Date: Tue, 29 Aug 2023 11:13:42 +0800 Subject: [PATCH] feat: add `ubuntu` series --- .github/workflows/test.yml | 36 ++++++++++++++++++------------------ action.yml | 18 +++++++++++++++--- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8d04df..f3d91a6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ name: Test Github Action on: push: branches: - - master + - ubuntu paths: - .github/workflows/test.yml - entrypoint.sh @@ -21,8 +21,8 @@ jobs: fail-fast: false matrix: texlive_version: [2018, 2019, 2020, 2021, 2022, 2023, latest] - debian_release: [buster, bullseye, bookworm, trixie] - name: Test ${{matrix.texlive_version}}-${{matrix.debian_release}} + base_image: [buster, bullseye, bookworm, trixie, xenial, bionic, focal, jammy] + name: Test ${{matrix.texlive_version}}-${{matrix.base_image}} runs-on: ubuntu-latest steps: - name: Set up Git repository @@ -32,7 +32,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: test.tex working_directory: test/ @@ -40,7 +40,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: test.tex working_directory: test/ pre_compile: | @@ -52,7 +52,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: | file1.tex file2.tex @@ -62,7 +62,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: glob_test*.tex working_directory: test/ @@ -70,7 +70,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: subdir*/main.tex working_directory: test/ work_in_root_file_dir: true @@ -79,7 +79,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: extglob/!(subdir3)_glob/*.tex working_directory: test/ work_in_root_file_dir: true @@ -88,7 +88,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: globstar/**/*.tex working_directory: test/ work_in_root_file_dir: true @@ -97,7 +97,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: math.tex working_directory: test/ @@ -105,7 +105,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: biblatex.tex working_directory: test/ @@ -113,7 +113,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: eps.tex working_directory: test/ @@ -121,7 +121,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: minted.tex working_directory: test/ latexmk_shell_escape: true @@ -135,7 +135,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: extra_fonts.tex working_directory: test/ latexmk_use_xelatex: true @@ -145,7 +145,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: graphviz.tex working_directory: test/ compiler: arara @@ -156,7 +156,7 @@ jobs: uses: ./ with: texlive_version: ${{ matrix.texlive_version }} - debian_release: ${{ matrix.debian_release }} + base_image: ${{ matrix.base_image }} root_file: | error.tex not_error.tex @@ -219,6 +219,6 @@ jobs: - name: Upload uses: actions/upload-artifact@v3 with: - name: texlive-${{ matrix.texlive_version }}-${{ matrix.debian_release }} + name: texlive-${{ matrix.texlive_version }}-${{ matrix.base_image }} path: test if: always() diff --git a/action.yml b/action.yml index 96cd57f..23075ae 100644 --- a/action.yml +++ b/action.yml @@ -6,9 +6,12 @@ inputs: texlive_version: description: Tex Live version to be used default: latest - debian_release: - description: Debian debian_release to be used + base_image: + description: Base image to be used default: trixie + debian_release: + description: "[Deprecated] use `base_image` instead" + default: deprecated root_file: description: The root LaTeX file to be compiled required: true @@ -52,6 +55,15 @@ inputs: runs: using: composite steps: + - name: set base_image + shell: bash + run: | + if [[ "${{ inputs.debian_release }}" != "deprecated" ]]; then + echo "Deprecated warning: `debian_release` is deprecated, use `base_image` instead." + echo "BASE_IMG=${{ inputs.debian_release }}" >> "${GITHUB_ENV}" + else + echo "BASE_IMG=${{ inputs.base_image }}" >> "${GITHUB_ENV}" + fi - shell: bash run: > docker run --rm @@ -115,7 +127,7 @@ runs: -v "$GITHUB_ACTION_PATH/entrypoint.sh":/entrypoint.sh -w "$GITHUB_WORKSPACE" --entrypoint "/entrypoint.sh" - zydou/texlive:${{ inputs.texlive_version }}-${{ inputs.debian_release }} + zydou/texlive:${{ inputs.texlive_version }}-${{ env.BASE_IMG }} "${{ inputs.root_file }}" "${{ inputs.working_directory }}" "${{ inputs.work_in_root_file_dir }}"