From 23949cf1f662dce285cda0762ba26a016129265f Mon Sep 17 00:00:00 2001 From: Willy Sudiarto Raharjo Date: Mon, 8 Apr 2024 20:27:05 +0900 Subject: Public www update: Sat Apr 13 15:04:57 UTC 2024. This also merge changes in CI engine: https://github.com/SlackBuildsOrg/slackbuilds/pull/5832 Signed-off-by: Willy Sudiarto Raharjo --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d4defbb1a..bfcc6a7f2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,3 +105,52 @@ jobs: with: issue-number: ${{ github.event.number }} body-path: comment-output + + dependencies: + name: Compute reverse dependencies + runs-on: ubuntu-22.04 + permissions: + contents: read + pull-requests: write + needs: [changes] + strategy: + matrix: + include: ${{ fromJSON(needs.changes.outputs.matrix) }} + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + show-progress: false + ref: ${{ github.head_ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + + - name: Get short package name + run: printf '%s\n' "${{ matrix.dir }}" | cut -d/ -f2 | sed 's/^/PACKAGE_NAME=/' >> "$GITHUB_ENV" + + - name: Look up dependencies + id: get_deps + uses: fjogeleit/http-request-action@8af28031091191b8e41afb287e0e56fce753c7b4 # v1.15.4 + with: + url: 'https://slackbuilds.org/revdeps.php?q=${{ env.PACKAGE_NAME }}' + method: 'GET' + preventFailureOnNoResponse: "true" + + - name: Build comment + run: | + { + printf '#### reverse dependencies - %s\n\n' "${{ matrix.dir }}" + if [[ ${{ steps.get_deps.outputs.response }} == "" ]] ; then + printf 'None\n' + else + printf '```\n' + printf '%s' ${{ steps.get_deps.outputs.response }} | sed 's/\\n/\n/g' | sort + printf '```\n' + fi + } > comment-output + shell: + bash + + - name: Comment with dependeny results + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 + with: + issue-number: ${{ github.event.number }} + body-path: comment-output -- cgit v1.2.3-65-gdbad