Skip to content

Commit

Permalink
Testing working-directory
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-bcl committed Aug 9, 2024
1 parent f39e5c4 commit f93a871
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/actions/create-signed-pull-request/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
description: Relative path under $GITHUB_WORKSPACE to the repository. Defaults to $GITHUB_WORKSPACE.
token:
description: A GitHub app token
owner:
description: GitHub repository owner, defaults to current repository
repository:
description: GitHub repository name, defaults to current repository

outputs:
pull-request-number:
Expand Down Expand Up @@ -44,19 +48,24 @@ runs:
body: ${{ inputs.body }}
url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

- name: Get repository info
run: |
echo "owner=$(gh repo view "$(git remote get-url origin)" --json owner --jq .owner.login)" | tee -a "$GITHUB_ENV"
echo "repository=$(gh repo view "$(git remote get-url origin)" --json name --jq .name)" | tee -a "$GITHUB_ENV"
shell: bash
working-directory: ${{ env.path }}
env:
GITHUB_TOKEN: ${{ inputs.token }}

- name: Git add
run: |
git pull
git checkout -b "$branch"
git push -u origin "$branch"
while IFS= read -r add_path; do
if [ -n "$add_path" ]; then
echo Adding "$add_path"
git add "$add_path"
fi
done <<< "$add_paths"
git status
git log -1 --format=%T HEAD
shell: bash
working-directory: ${{ env.path }}
env:
Expand All @@ -67,6 +76,8 @@ runs:
- name: Commit and push
uses: marcus-bcl/github-app-commit-action@main
with:
owner: ${{ env.owner }}
repository: ${{ env.repository }}
working-directory: ${{ env.path }}
fail-on-no-changes: false
message: ${{ inputs.commit-message }}
Expand Down

0 comments on commit f93a871

Please sign in to comment.