Skip to content

refactor: rename myCourses feat to courses #277

refactor: rename myCourses feat to courses

refactor: rename myCourses feat to courses #277

Workflow file for this run

name: build.yml
on:
push:
branches:
- v2
pull_request:
branches:
- v2
jobs:
find-configs:
name: 📇 Find configs
uses: ./.github/workflows/find-configs.yml
build:
runs-on: ubuntu-latest
name: 🏗️ Build
needs:
- find-configs
strategy:
matrix:
config: ${{ fromJson(needs.find-configs.outputs.configs) }}
permissions:
id-token: write
attestations: write
steps:
- name: 📥️ checkout
uses: actions/checkout@v4
- name: 🏗 build Better-Moodle for ${{ matrix.config }}
id: build
uses: ./.github/actions/build
with:
config: ${{ matrix.config }}
- name: 🦭 attest build provenance
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ steps.build.outputs.file }}
subject-digest: sha256:${{ steps.build.outputs.digest }}
show-summary: true
- name: 📊 aggregate build statistics
run: |
echo "STATS_SIZE=$(ls -sh --si '${{ steps.build.outputs.dir }}/${{ steps.build.outputs.file }}' | awk '{print $1}')B" >> $GITHUB_ENV
echo "STATS_LINES=$(wc -l '${{ steps.build.outputs.dir }}/${{ steps.build.outputs.file }}' | awk '{print $1}')" >> $GITHUB_ENV
# TODO: Output build stats
- name: ✍️ print build stats in summary
run: |
echo "# 🏗️ ${{ matrix.config }}" >> $GITHUB_STEP_SUMMARY
echo "## Built file: \`${{ steps.build.outputs.file }}\`" >> $GITHUB_STEP_SUMMARY
echo "| Metric | Value |" >> $GITHUB_STEP_SUMMARY
echo "|-------:|:------|" >> $GITHUB_STEP_SUMMARY
echo "| **File size** | ${{ env.STATS_SIZE }} |" >> $GITHUB_STEP_SUMMARY
echo "| **Line count** | ${{ env.STATS_LINES }} |" >> $GITHUB_STEP_SUMMARY
echo "## Build stats" >> $GITHUB_STEP_SUMMARY
echo "| Metric | Value |" >> $GITHUB_STEP_SUMMARY
echo "|-------:|:------|" >> $GITHUB_STEP_SUMMARY
echo "| **Creating config duration** | $(cat ${{ steps.build.outputs.dir }}/.stats_perf_conf) |" >> $GITHUB_STEP_SUMMARY
echo "| **Building duration** | $(cat ${{ steps.build.outputs.dir }}/.stats_perf_build) |" >> $GITHUB_STEP_SUMMARY
echo "| **Total duration** | $(cat ${{ steps.build.outputs.dir }}/.stats_perf_total) |" >> $GITHUB_STEP_SUMMARY
echo "*Durations are mm:ss,s*"
echo "## Included features" >> $GITHUB_STEP_SUMMARY
cat ${{ steps.build.outputs.dir }}/.stats_features.md >> $GITHUB_STEP_SUMMARY