Report published images #273
This file contains hidden or 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: Report published images | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| paths: | |
| - "build/reports/*.Rmd" | |
| pull_request: | |
| branches: | |
| - "master" | |
| paths: | |
| - "build/reports/*.Rmd" | |
| workflow_run: | |
| workflows: | |
| - "Build & Push Core images" | |
| - "Build & Push experimental images" | |
| branches: | |
| - "master" | |
| types: | |
| - completed | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| generate_matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix-main: ${{ steps.set-matrix.outputs.matrix-main }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - id: set-matrix | |
| run: | | |
| CONTENT_MAIN="$(jq -r 'tostring' build/matrix/all.json)" | |
| echo "matrix-main=${CONTENT_MAIN}" >> "$GITHUB_OUTPUT" | |
| echo "${CONTENT_MAIN}" | |
| inspect-main: | |
| needs: generate_matrix | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{fromJson(needs.generate_matrix.outputs.matrix-main)}} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Clean up | |
| run: | | |
| docker image prune --all --force | |
| - name: Pull images | |
| run: | | |
| BAKE_JSON="bakefiles/${{ matrix.r_version }}.docker-bake.json" \ | |
| BAKE_GROUP="${{ matrix.group }}" \ | |
| make pull-image-group | |
| - name: Inspect built image | |
| run: | | |
| IMAGELIST_NAME="${{ matrix.r_version }}-${{ matrix.group }}.tsv" \ | |
| make inspect-image-all | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: tmp-${{ matrix.r_version }}-${{ matrix.group }} | |
| path: tmp | |
| inspect-experimental: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Clean up | |
| run: | | |
| docker image prune --all --force | |
| - name: Pull images | |
| run: | | |
| BAKE_JSON="bakefiles/experimental.docker-bake.json" \ | |
| BAKE_GROUP="default" \ | |
| make pull-image-group | |
| - name: Inspect built image | |
| run: | | |
| IMAGELIST_NAME="experimental.tsv" \ | |
| make inspect-image-all | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: tmp-experimental | |
| path: tmp | |
| publish_reports: | |
| if: always() | |
| needs: | |
| - inspect-main | |
| - inspect-experimental | |
| runs-on: ubuntu-latest | |
| container: | |
| image: rocker/tidyverse:latest | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@v6 | |
| - name: Set as safe for following git commands | |
| run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| - name: Checkout wiki | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: "${{ github.repository }}.wiki" | |
| path: reports | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: tmp | |
| pattern: tmp-* | |
| merge-multiple: true | |
| - name: Generate reports and update wiki home | |
| run: | | |
| make --jobs=2 report-all | |
| make --always-make wiki-home | |
| - name: Upload artifacts | |
| if: github.event_name == 'pull_request' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: reports | |
| path: reports | |
| - name: Update wiki | |
| if: github.event_name != 'pull_request' | |
| uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| commit_message: Automated update | |
| repository: reports |