Skip to content

Commit

Permalink
Maybe comment?
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 0747f83 commit 299ed70
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
45 changes: 44 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
jobs:
build-framework:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
Expand Down Expand Up @@ -42,6 +44,12 @@ jobs:
docker cp framework:/framework/etc/kairos/versions.yaml .
.github/yaml2md.sh >> $GITHUB_STEP_SUMMARY
docker rm framework
- uses: actions/upload-artifact@v3
with:
name: versions.zip
path: |
versions.yaml
if-no-files-found: error
build-framework-fips:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -79,4 +87,39 @@ jobs:
docker run --name framework ${{ steps.meta.outputs.tags }} true || true
docker cp framework:/framework/etc/kairos/versions.yaml .
.github/yaml2md.sh >> $GITHUB_STEP_SUMMARY
docker rm framework
docker rm framework
- uses: actions/upload-artifact@v3
with:
name: versions_fips.zip
path: |
versions.yaml
if-no-files-found: error
comment-pr:
runs-on: ubuntu-latest
depends-on: [build-framework, build-framework-fips]
steps:
- name: Download versions
uses: actions/download-artifact@v3
with:
name: versions.zip
- name: Rename version
run: |
mv versions.yaml versions_framework.yaml
- name: Download versions fips
uses: actions/download-artifact@v3
with:
name: versions_fips.zip
- name: Rename version fips
run: |
mv versions.yaml versions_fips.yaml
- name: Generate PR text
run: |
echo "Framework packages:" > pr-comment.txt
.github/yaml2md.sh versions_framework.yaml >> pr-comment.txt
echo "Framework fips packages:" >> pr-comment.txt
.github/yaml2md.sh versions_fips.yaml >> pr-comment.txt
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
message-file: pr-comment.txt

4 changes: 3 additions & 1 deletion .github/yaml2md.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash



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

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

0 comments on commit 299ed70

Please sign in to comment.