Skip to content

Report

Report #78

Workflow file for this run

name: Report
on:
push:
branches: ['*']
# manual run
workflow_dispatch:
# scheduled run (daily at 2:15)
schedule:
- cron: "15 2 * * *"
jobs:
report:
name: "Report"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup Go"
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: "Run report"
run: |
bash ./scripts/report.sh
- name: "Show report"
run: |
echo "Showing report"
echo ::group::VPP API
cat ./output/vppapi.txt
echo ::endgroup::
echo ::group::VPP API Lint
cat ./output/vppapi_lint.txt
echo ::endgroup::
echo ::group::VPP API Diff
cat ./output/vppapi_diff.txt
echo ::endgroup::
- name: "Upload artifact"
uses: actions/upload-artifact@v4
with:
name: vppapi_report
path: ./output/vppapi*.txt
- name: Check for Changes
if: ${{ github.ref == 'refs/heads/main' }}
id: check_changes
run: |
if [[ -n "$(git diff --exit-code REPORT.md)" ]]; then
echo "Changes detected."
echo "::set-output name=has_changes::true"
git diff REPORT.md
else
echo "No changes detected."
echo "::set-output name=has_changes::false"
fi
- name: Commit and Push Changes
if: ${{ steps.check_changes.outputs.has_changes == 'true' && github.ref == 'refs/heads/main' }}
run: |
# configure user
git config --global user.name "Ondrej Fabry"
git config --global user.email "[email protected]"
# stage any file changes to be committed
git add REPORT.md
# make commit with staged changes
git commit -s -m '[automated] Update REPORT.md'
# push the commit back up to source GitHub repository
git push