From 757ecb0e04c52f43b19c4d0f13f455d191debd29 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Tue, 7 May 2024 19:38:29 +0200 Subject: [PATCH] added cmd-action --- .github/workflows/cmd-check.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/cmd-check.yml diff --git a/.github/workflows/cmd-check.yml b/.github/workflows/cmd-check.yml new file mode 100644 index 0000000..cdc394f --- /dev/null +++ b/.github/workflows/cmd-check.yml @@ -0,0 +1,33 @@ +name: Command-Action + +on: + pull_request: + issue_comment: + types: [created] + +jobs: + cmd-check: + runs-on: ubuntu-latest + outputs: + commands: ${{ steps.command.outputs.commands }} + branch: ${{ steps.command.outputs.branch }} + name: Bot + steps: + - uses: paritytech/cmd-action/check@parse-comment + id: command + + cmd-run: + needs: [cmd-check] + if: ${{ github.event.issue.pull_request }} + continue-on-error: true + # We set the current machine here (to differ between ours and generic ones) + runs-on: ubuntu-latest + strategy: + matrix: + command: ${{ fromJson(needs.cmd-check.outputs.commands) }} + name: Run command + steps: + - uses: paritytech/cmd-action/run@parse-comment + with: + branch: ${{ needs.cmd-check.outputs.branch }} + command: ${{ matrix.command }}