Skip to content

Commit

Permalink
Output a nicer table via a script
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed Dec 5, 2023
1 parent a2a89b2 commit 4d9d680
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,10 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
target: framework
- name: Extract versions
shell: bash --noprofile --norc -e {0}
run: |
docker run --name framework ${{ steps.meta.outputs.tags }} true || true
docker cp framework:/framework/etc/kairos/versions.yaml .
echo "### Framework versions\n" >> $GITHUB_STEP_SUMMARY
cat versions.yaml >> $GITHUB_STEP_SUMMARY
echo "\n" >> $GITHUB_STEP_SUMMARY
.githut/yaml2md.sh >> $GITHUB_STEP_SUMMARY
docker rm framework
build-framework-fips:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -84,11 +81,8 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
target: framework_fips
- name: Extract versions
shell: bash --noprofile --norc -e {0}
run: |
docker run --name framework ${{ steps.meta.outputs.tags }} true || true
docker cp framework:/framework/etc/kairos/versions.yaml .
echo "### Framework versions (FIPS)\n" >> $GITHUB_STEP_SUMMARY
cat versions.yaml >> $GITHUB_STEP_SUMMARY
echo "\n" >> $GITHUB_STEP_SUMMARY
.githut/yaml2md.sh >> $GITHUB_STEP_SUMMARY
docker rm framework
9 changes: 9 additions & 0 deletions .github/yaml2md.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

echo "| Name | Category | Version |"
echo "|------|----------|---------|"

yq e '.[] | [.name, .category, .version] | @tsv' versions.yaml | while IFS=$'\t' read -r name category version
do
echo "| $name | $category | $version |"
done

0 comments on commit 4d9d680

Please sign in to comment.