Skip to content

Feature Summary Report Generator #10

Feature Summary Report Generator

Feature Summary Report Generator #10

name: Feature Summary Report Generator
on:
workflow_dispatch:
inputs:
SHA:
description: "Commit SHA to generate the summary from."
required: true
# Run every day
schedule:
- cron: '0 0 * * *'
# By specifying the access of one of the scopes, all of those that are not
# specified are set to 'none'.
permissions:
# To read actions state with catchpoint/workflow-telemetry-action
actions: read
# To be able to access the repository with actions/checkout
contents: read
# To allow retrieving information from the PR API
pull-requests: read
# To be able to set commit status
statuses: write
jobs:
summary_report:
name: "Summary Report"
env:
job_name: "Summary Report"
runs-on: ubuntu-24.04
steps:
- name: Checkout context ref (trusted)
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- name: Set Environment Variables
uses: ./.github/actions/set-env-variables
- name: Install Cilium CLI
uses: cilium/cilium-cli@a4936ec2afa58bf755162928456190344a179207 # v0.16.24
with:
skip-build: ${{ env.CILIUM_CLI_SKIP_BUILD }}
image-repo: ${{ env.CILIUM_CLI_IMAGE_REPO }}
# TODO: Switch once a new Cilium CLI version is released
ci-version: 67be187d7d6dc3a34aadf31b6c783c79ce3b4fae
- name: Generate Features Summary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cilium features summary \
--commit=${{ inputs.SHA || github.sha }} \
--repo=${{ github.repository }} \
--metrics-directory=${{ inputs.SHA || github.sha }} \
--anchor \
--output-file=summary-features.md
echo "\n\nEnd Of Report" >> summary-features.md
# There's a limitation with GITHUB_STEP_SUMMARY which only accepts 1024K
# at a time, so we need to use split uploading the file into multiple
# steps.
- name: Generate 1st part of GitHub step summary
run: |
skip_size="0"
block_size=$(numfmt --from=iec 1023K)
chunk=$(dd if=summary-features.md bs=$block_size skip=$skip_size count=1 2>/dev/null)
echo -n "$chunk" >> $GITHUB_STEP_SUMMARY
- name: Generate 2nd part of GitHub step summary
run: |
skip_size="1"
block_size=$(numfmt --from=iec 1023K)
chunk=$(dd if=summary-features.md bs=$block_size skip=$skip_size count=1 2>/dev/null)
echo "$chunk" >> $GITHUB_STEP_SUMMARY
commit-status-final:
if: ${{ always() }}
name: Commit Status Final
needs: summary_report
runs-on: ubuntu-24.04
steps:
- name: Set final commit status
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1
with:
sha: ${{ inputs.SHA || github.sha }}
status: ${{ needs.summary_report.result }}