Skip to content

Commit

Permalink
Merge pull request #583 from eitsupi/filter-deinstall
Browse files Browse the repository at this point in the history
[CI] Deinstalled apt packages should not be listed in reports
  • Loading branch information
eitsupi committed Dec 21, 2022
2 parents 7447d06 + dba717c commit 1466525
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
- "master"
paths:
- "build/reports/*.Rmd"
pull_request:
branches:
- "master"
paths:
- "build/reports/*.Rmd"
workflow_run:
workflows:
- "Build & Push Core images"
Expand All @@ -30,7 +35,7 @@ jobs:
- id: set-matrix
run: |
CONTENT=$(jq -r '.r_version += ["extra"] | tostring' build/matrix/all.json)
echo ::set-output name=matrix::"${CONTENT}"
echo "matrix=${CONTENT}" >> "$GITHUB_OUTPUT"
echo "${CONTENT}"
inspect:
Expand Down Expand Up @@ -71,6 +76,7 @@ jobs:
- name: Set as safe for following git commands
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout wiki
if: github.event_name != 'pull_request'
uses: actions/checkout@v3
with:
repository: "${{ github.repository }}.wiki"
Expand All @@ -87,7 +93,14 @@ jobs:
run: |
make --jobs=2 report-all
make --always-make wiki-home
- name: Upload artifacts
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
with:
name: reports
path: reports
- name: Update wiki
if: github.event_name != 'pull_request'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Automated update
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ IMAGE_FILTER ?= label=org.opencontainers.image.source=$(IMAGE_SOURCE)
inspect-image/%:
mkdir -p $(REPORT_SOURCE_ROOT)/$*
-docker image inspect $* > $(REPORT_SOURCE_ROOT)/$*/docker_inspect.json
-docker run --rm $* dpkg-query --show --showformat='$${Package}\t$${Version}\n' > $(REPORT_SOURCE_ROOT)/$*/apt_packages.tsv
-docker run --rm $* dpkg-query --show --showformat='$${Package}\t$${Version}\t$${Status}\n' > $(REPORT_SOURCE_ROOT)/$*/apt_packages.tsv
-docker run --rm $* Rscript -e 'as.data.frame(installed.packages()[, 3])' > $(REPORT_SOURCE_ROOT)/$*/r_packages.ssv
-docker run --rm $* python3 -m pip list --disable-pip-version-check > $(REPORT_SOURCE_ROOT)/$*/pip_packages.ssv
inspect-manifest/%: inspect-image/%
Expand Down
1 change: 1 addition & 0 deletions build/reports/template.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ df_apt <- params$apt_file |>
stringr::str_subset(r"(\t)") |>
I() |>
read_tsv(col_names = FALSE) |>
dplyr::filter(X3 == "install ok installed") |>
dplyr::select(
package = X1,
version = X2
Expand Down

0 comments on commit 1466525

Please sign in to comment.