From 131c7bf06ece513b2d39cc30d383be84928d1929 Mon Sep 17 00:00:00 2001 From: baxtree Date: Tue, 19 Dec 2023 08:46:22 +0000 Subject: [PATCH] add housekeeping during docker build and fix docs build --- .github/workflows/dockerhub.yml | 39 ++++++++++++++++++++++++--------- .readthedocs.yml | 19 ++++++++-------- requirements-site.txt | 3 ++- 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 24cacff..c73d49a 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -26,7 +26,8 @@ jobs: - name: Extract the tag id: tag - run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\/v/} + run: | + echo "SUBALIGNER_TAG=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV - name: Build and push the latest image id: docker_build_latest @@ -35,16 +36,22 @@ jobs: context: ./docker file: "./docker/Dockerfile-Ubuntu20" build-args: | - "RELEASE_VERSION=${{ steps.tag.outputs.TAG }}" + "RELEASE_VERSION=${{ env.SUBALIGNER_TAG }}" platforms: linux/amd64,linux/arm64 allow: network.host github-token: ${{ github.token }} tags: | baxtree/subaligner:latest - baxtree/subaligner:${{ steps.tag.outputs.TAG }} - baxtree/subaligner:${{ steps.tag.outputs.TAG }}.u20 + baxtree/subaligner:${{ env.SUBALIGNER_TAG }} + baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.u20 push: true + - name: Remove the local latest image + run: | + docker rmi -f baxtree/subaligner:latest + docker rmi -f baxtree/subaligner:${{ env.SUBALIGNER_TAG }} + docker rmi -f baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.u20 + - name: Build and push the Ubuntu 22 image id: docker_build_u22 uses: docker/build-push-action@v4 @@ -52,13 +59,17 @@ jobs: context: ./docker file: "./docker/Dockerfile-Ubuntu22" build-args: | - "RELEASE_VERSION=${{ steps.tag.outputs.TAG }}" + "RELEASE_VERSION=${{ env.SUBALIGNER_TAG }}" platforms: linux/amd64,linux/arm64 allow: network.host github-token: ${{ github.token }} - tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.u22 + tags: baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.u22 push: true + - name: Remove the local Ubuntu 22 image + run: | + docker rmi -f baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.u22 + - name: Build and push the Fedora 34 image id: docker_build_fed34 uses: docker/build-push-action@v2 @@ -66,13 +77,17 @@ jobs: context: ./docker file: "./docker/Dockerfile-Fedora34" build-args: | - "RELEASE_VERSION=${{ steps.tag.outputs.TAG }}" + "RELEASE_VERSION=${{ env.SUBALIGNER_TAG }}" platforms: linux/amd64,linux/arm64 allow: network.host github-token: ${{ github.token }} - tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.fed34 + tags: baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.fed34 push: true + - name: Remove the local Fedora 34 image + run: | + docker rmi -f baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.fed34 + - name: Build and push the ArchLinux image id: docker_build_arch uses: docker/build-push-action@v2 @@ -80,9 +95,13 @@ jobs: context: ./docker file: "./docker/Dockerfile-ArchLinux" build-args: | - "RELEASE_VERSION=${{ steps.tag.outputs.TAG }}" + "RELEASE_VERSION=${{ env.SUBALIGNER_TAG }}" platforms: linux/amd64 allow: network.host github-token: ${{ github.token }} - tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.arch + tags: baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.arch push: true + + - name: Remove the local ArchLinux image + run: | + docker rmi -f baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.arch diff --git a/.readthedocs.yml b/.readthedocs.yml index ecbf1a7..4b496df 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,23 +1,22 @@ -# .readthedocs.yml +# .readthedocs.yaml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details # Required version: 2 +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.10" + # Build documentation in the docs/ directory with Sphinx sphinx: configuration: site/source/conf.py -# Build documentation with MkDocs -#mkdocs: -# configuration: mkdocs.yml - -# Optionally build your docs in additional formats such as PDF and ePub -formats: all - -# Optionally set the version of Python and requirements required to build your docs +# We recommend specifying your dependencies to enable reproducible builds: +# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html python: - version: 3.8 install: - requirements: requirements-site.txt diff --git a/requirements-site.txt b/requirements-site.txt index 792b8ed..001e051 100644 --- a/requirements-site.txt +++ b/requirements-site.txt @@ -1,3 +1,4 @@ sphinx==3.3.1 sphinx-rtd-theme==0.5.0 -docutils~=0.17.0 \ No newline at end of file +docutils~=0.17.0 +jinja2<3.1.0 \ No newline at end of file