Skip to content

Commit

Permalink
added branch reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Bullrich committed Apr 22, 2024
1 parent 5c0bff6 commit 174f090
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/cmd-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
commands: ${{ steps.cmd.outputs.commands }}
branch: ${{ steps.branch.outputs.branch }}
name: Bot
steps:
- uses: actions/checkout@v4
Expand All @@ -21,6 +22,8 @@ jobs:
with:
commands-directory: ".github/commands"
GITHUB_TOKEN: ${{ github.token }}
- run: echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> "$GITHUB_OUTPUT"
id: branch
- name: Print commands
if: ${{ github.event.issue.pull_request }}
run: echo "Commands are $CMD"
Expand All @@ -47,9 +50,8 @@ jobs:
steps:
- name: Download repo
uses: actions/[email protected]
- run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ github.token }}
with:
ref: needs.cmd-check.outputs.branch
- name: Generate script
# Here it would get the script from previous step
run: $COMMAND
Expand Down

0 comments on commit 174f090

Please sign in to comment.