Skip to content

Commit

Permalink
chore: add summary build with commit fest and patch id information
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Gonzalez V. <jonathan.abdiel@gmail.com>
  • Loading branch information
sxd committed Aug 30, 2024
1 parent 8025e57 commit e54ff6d
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-commitfest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
permissions:
contents: read
packages: write
outputs:
tag: ${{ env.TAG }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand Down Expand Up @@ -60,3 +62,37 @@ jobs:
build-args: |
PG_REPO=https://github.com/postgresql-cfbot/postgresql.git
PG_BRANCH=${{ env.BRANCH }}
generate-summary:
name: Commit Fest image build
runs-on: ubuntu-22.04
needs:
- build-pg
steps:
- name: Markdown
run: |
commitFestID=${{ github.event.inputs.commitfest_id }}
commitFestPatchID=${{ github.event.inputs.patch_id }}
commitFestURL="https://commitfest.postgresql.org/${commitFestID}/${commitFestPatchID}"
image="${{ env.REGISTRY }}:${{ needs.build-pg.outputs.tag }}"
imageURL="https://${image}"
echo "# Commit Fest Patch" >> $GITHUB_STEP_SUMMARY
echo "[$commitFestID / $commitFestPatchID]($commitFestURL)" >> $GITHUB_STEP_SUMMARY
echo "# Container Image" >> $GITHUB_STEP_SUMMARY
echo "[$image]($imageURL)" >> $GITHUB_STEP_SUMMARY
echo "# CloudNativePG Cluster definition" >> $GITHUB_STEP_SUMMARY
echo "You can create a cluster in CloudNativePG running this image:" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`sh" >> $GITHUB_STEP_SUMMARY
echo "(cat <<EOF" >> $GITHUB_STEP_SUMMARY
echo "apiVersion: postgresql.cnpg.io/v1" >> $GITHUB_STEP_SUMMARY
echo "kind: Cluster" >> $GITHUB_STEP_SUMMARY
echo "metadata:" >> $GITHUB_STEP_SUMMARY
echo " name: commitfest-$commitFestID-$commitFestPatchID" >> $GITHUB_STEP_SUMMARY
echo "spec:" >> $GITHUB_STEP_SUMMARY
echo " imageName: $image" >> $GITHUB_STEP_SUMMARY
echo " instances: 3" >> $GITHUB_STEP_SUMMARY
echo " storage:" >> $GITHUB_STEP_SUMMARY
echo " size: 1Gi" >> $GITHUB_STEP_SUMMARY
echo "EOF" >> $GITHUB_STEP_SUMMARY
echo ") | kubectl apply -f -" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

0 comments on commit e54ff6d

Please sign in to comment.