Skip to content

feat: comment deploy started on merged pull requests #15

feat: comment deploy started on merged pull requests

feat: comment deploy started on merged pull requests #15

Workflow file for this run

name: Comment Deployment Completion
on:
pull_request:
branches: [main]
#types: [closed]
jobs:
set-limit:
#if: ${{ github.event.pull_request.merged }}
name: Set changed routers limit
runs-on: ubuntu-latest
steps:
- uses: tj-actions/changed-files@v44
with:
files: |
routers/**
write_output_files: true
- id: set-limit
run: |
echo "limit=$(cat .github/outputs/all_changed_files.txt | grep -E -o '([a-z]{3}[0-9]{1})' | jq -Rcn '[inputs]')" >> $GITHUB_OUTPUT
outputs:
limit: ${{ steps.set-limit.outputs.limit }}
comment_on_pr:
name: Comment on Pull Request
needs: set-limit
runs-on: ubuntu-latest
strategy:
matrix:
limit: ${{ fromJson(needs.set-limit.outputs.limit) }}
steps:
- id: template
run: echo "template=$(cat .github/templates/pull_request_comment.tmpl)" >> $GITHUB_OUTPUT
- id: pop_uppercase
run: echo "pop_uppercase=${${{ matrix.limit }}@U}" >> $GITHUB_OUTPUT
- id: pop_lowercase
run: echo "pop_lowercase=${${{ matrix.limit }}@L}" >> $GITHUB_OUTPUT
- uses: thollander/actions-comment-pull-request@v2
with:
message: |
${{ format(steps.template.outputs.template,
steps.pop_uppercase.outputs.pop_uppercase,
steps.pop_lowercase.ouputs.pop_lowercase,
github.event.number) }}
comment_tag: ${{ steps.pop_lowercase.ouputs.pop_lowercase }}
pr_number: ${{ github.event.number }}