Dependency Tree Reporter #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dependency Tree Reporter | |
# This gets called when ./dep-diff-pull_request.yml has completed. See that file | |
# for why this is split into two. | |
on: | |
workflow_run: | |
workflows: [ "Dependency Tree Input Builder" ] | |
types: | |
- completed | |
env: | |
# The name of the labels to use if the dependencies are ok | |
DEPS_OK_LABEL_NAME: deps-ok | |
# The name of the labels to use if the dependencies changed | |
DEPS_CHANGED_LABEL_NAME: deps-changed | |
# People/teams to mention in the PR comment if dependencies changed | |
CHANGE_MENTIONS: '@wildfly/prod' | |
permissions: {} | |
jobs: | |
compare: | |
permissions: | |
actions: read # to download a workflow artifact | |
pull-requests: write # for commenting on and labeling pull requests | |
runs-on: ubuntu-latest | |
if: > | |
${{ github.event.workflow_run.event == 'pull_request' && | |
github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: input-artifacts | |
github-token: ${{ github.token }} | |
run-id: ${{ github.event.workflow_run.id }} | |
- name: Set needed env vars in outputs | |
id: prepare | |
run: | | |
echo current directory contents | |
ls -al | |
echo "deps_ok_label_name=${DEPS_OK_LABEL_NAME}" >> $GITHUB_OUTPUT | |
echo "deps_changed_label_name=${DEPS_CHANGED_LABEL_NAME}" >> $GITHUB_OUTPUT | |
echo "change_mentions=${CHANGE_MENTIONS}" >> $GITHUB_OUTPUT | |
echo Reading PR number | |
tmp=$(<pr) | |
echo "PR: ${tmp}" | |
echo "pr=${tmp}" >> $GITHUB_OUTPUT | |
echo Reading base version files | |
tmp=$(<baseVersions) | |
echo "Base version files: ${tmp}" | |
echo "base_files=${tmp}" >> $GITHUB_OUTPUT | |
echo Reading new version files | |
tmp=$(<newVersions) | |
echo "New version files: ${tmp}" | |
echo "new_files=${tmp}" >> $GITHUB_OUTPUT | |
- name: Check versions | |
uses: wildfly/dep-tree-diff@master | |
with: | |
pr: ${{ steps.prepare.outputs.pr }} | |
token: '${{ secrets.GITHUB_TOKEN }}' | |
deps-ok-label: ${{ steps.prepare.outputs.deps_ok_label_name }} | |
deps-changed-label: ${{ steps.prepare.outputs.deps_changed_label_name }} | |
tool-change-mentions: ${{ steps.prepare.outputs.change_mentions }} | |
base-version-files: ${{ steps.prepare.outputs.base_files }} | |
new-version-files: ${{ steps.prepare.outputs.new_files }} |