Duo/BuildRoot: Update to v1.1.3 #51
This file contains 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
# Simple workflow for deploying static content to GitHub Pages | |
name: Generate and Upload Tables | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
inputs: | |
deploy: | |
description: 'Upload Tables to Pages' | |
type: boolean | |
debuginfo: | |
description: 'Output Debug' | |
type: boolean | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "tables" | |
cancel-in-progress: false | |
jobs: | |
# Single deploy job since we're just deploying | |
build: | |
name: Build Tables | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Generate Images | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ninja-build | |
sudo pip3 install --upgrade meson | |
pip install -r assets/requirements.txt | |
mkdir assets/output | |
python assets/generate_svgimage.py -p . -o assets/output --html https://${{ github.repository_owner }}.github.io/support-matrix | tee build.log | |
python assets/generate_svgimage.py -p . -o assets/output --html https://${{ github.repository_owner }}.github.io/support-matrix -l zh | tee -a build.log | |
- name: Check Commit ID | |
id: truecommit | |
run: | | |
echo "shortid=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" | |
echo "longid=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | |
echo "$(git log -1)" >> ${{ github.workspace }}/message.log | |
- name: Generate Hash | |
id: hash | |
working-directory: ${{ github.workspace }}/assets/output/ | |
run: echo "$(sha256sum *)" >> ${{ github.workspace }}/assets/output/result.sha256 | |
- name: Upload to Pages | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
name: support-matrix-${{ github.run_id }} | |
path: 'assets/output' | |
- name: Output Success Summary | |
run: | | |
echo "# Support Matrix Table Build Report" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "[CI #${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) powered by [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}) has successfully generate tables." >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "## Commit Summary" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "CI has built on commit [${{ steps.truecommit.outputs.shortid }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ steps.truecommit.outputs.longid }}). The commit message is shown below." >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY | |
cat ${{ github.workspace }}/message.log >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "## Artifacts Hash" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY | |
cat ${{ github.workspace }}/assets/output/result.sha256 >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "## Build Log" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY | |
cat ${{ github.workspace }}/build.log >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
- name: Output Debug Info | |
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debuginfo }} | |
run: | | |
echo "## Debug" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY | |
echo "${{ toJSON( github ) }}" >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
deploy: | |
needs: build | |
name: Upload Tables | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || ( github.event_name == 'workflow_dispatch' && inputs.deploy ) }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
with: | |
artifact_name: support-matrix-${{ github.run_id }} | |
- name: Output Success Summary | |
run: | | |
echo "# Support Matrix Table Deployment Report" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "[CI #${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) powered by [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}) has successfully deployed tables to pages." >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "Visit \`${{ steps.deployment.outputs.page_url }}{name}\` for tables." >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY |