From 7d174ad864022c350217ef8fdf328158bc8ede5f Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Fri, 19 Jul 2024 16:02:12 +1000 Subject: [PATCH 1/2] Add comment bot to report Docker image package versions --- .github/workflows/integration-test.yml | 26 ++++++++++++++++++++++++++ docker/Dockerfile | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index fb9191d..fc95b15 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -22,6 +22,7 @@ on: permissions: id-token: write contents: read + pull-requests: write # Required for validation results comment bot jobs: integration-test: @@ -56,6 +57,31 @@ jobs: cd ./dea-sandbox/integration-testing CURRENT_UID=1000:100 docker-compose up -d + - name: Extract package versions + run: | + cd ./dea-sandbox/integration-testing + docker-compose exec -T sandbox cat /tmp/requirements.txt > requirements.txt + + - name: Read package versions + id: versions + run: | + { + echo 'content<> "$GITHUB_OUTPUT" + + # Post package versions as a comment on the PR + - name: Post package versions as a comment + uses: mshick/add-pr-comment@v2 + if: github.event_name == 'pull_request' + with: + message: | + ### Installed packages: + ``` + ${{ steps.versions.outputs.content }} + ``` + - name: Set up Datacube and Test run: | cd ./dea-sandbox/integration-testing diff --git a/docker/Dockerfile b/docker/Dockerfile index 0a7ac52..8e9b01e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -51,7 +51,7 @@ RUN echo "Enable server extensions" \ COPY assets/sync_repo assets/jupyterhub-singleuser /usr/local/bin/ COPY assets/overrides.json /env/share/jupyter/lab/settings/ -RUN pip list --format=freeze +RUN pip list --format=freeze > /tmp/requirements.txt WORKDIR "/home/$nb_user" ENTRYPOINT ["/env/bin/tini", "--"] From bd05abc045ce90d7713b759902bdaee5554b083a Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 30 Jul 2024 15:21:23 +1000 Subject: [PATCH 2/2] Update integration-test.yml --- .github/workflows/integration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index fc95b15..48d2ce2 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -22,7 +22,7 @@ on: permissions: id-token: write contents: read - pull-requests: write # Required for validation results comment bot + pull-requests: write # Required for Sandbox image packages comment bot jobs: integration-test: