Skip to content

Merge pull request #66 from panglars/vf2 #8

Merge pull request #66 from panglars/vf2

Merge pull request #66 from panglars/vf2 #8

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Generate Tables
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# 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: "pages"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
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
- 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 Table
uses: actions/upload-artifact@main
with:
name: support-matrix-${{ github.run_id }}
path: 'assets/output'
# - name: Clone assets Branch
# uses: actions/checkout@v4
# with:
# ref: assets
# path: res
# - name: Add Images to assets
# id: diffcheck
# run: |
# cp assets/output/* res/
# cd res
# echo "diff=$(git diff | wc -m)" >> "$GITHUB_OUTPUT"
# - name: Push to assets
# working-directory: res/
# if: ${{ steps.diffcheck.outputs.diff != '0' }}
# run: |
# git config user.name 'github-actions[bot]'
# git config user.email 'github-actions[bot]@users.noreply.github.com'
# git add .
# git commit -m "Auto update images: ${{ steps.truecommit.outputs.shortid }}"
# git push
- name: Upload to Pages
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'assets/output'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Output Success Summary
run: |
echo "# Support Matrix Table Generate 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