Skip to content

Commit

Permalink
[Bugfix] Get the path to the modify file using the directory path and…
Browse files Browse the repository at this point in the history
… filename (#19)

* fix: add directory name

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>

* fix: use test command

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>

* Revert "fix: use test command"

This reverts commit 0879c8e.

* fix: disable pr creation

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>

* fix: use test command

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>

* fix: file not found error

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>

* fix: path name for updates

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>

* fix: bugfix path location

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>

* fix: use update subcomment for dependabot cli

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>

* fix: use test command

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>

* Revert "fix: use test command"

This reverts commit c4b2a45.

* fix: add comment and re-ordering for step

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>

* fix: deleted unnecessary comment

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>

* Update .github/workflows/_update-deps.yaml

Co-authored-by: Yusuke Kato <kpango@vdaas.org>
Signed-off-by: Hiroto Funakoshi <hiroto.funakoshi.hiroto@gmail.com>

---------

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: Hiroto Funakoshi <hiroto.funakoshi.hiroto@gmail.com>
Co-authored-by: Yusuke Kato <kpango@vdaas.org>
  • Loading branch information
hlts2 and kpango authored May 28, 2024
1 parent 408f8a2 commit 8b42a3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/actions/dependabot/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ runs:
CHANGED_LIST_NUM=$(echo "${CHANGED_LIST}" | yq '. | length')
for i in $(seq 0 $((${CHANGED_LIST_NUM}-1))); do
NAME=$(echo "${CHANGED_LIST}" | yq ".[${i}].name")
FILE_NAME=$(echo "${CHANGED_LIST}" | yq ".[${i}].name")
DIRECTORY_NAME=".$(echo "${CHANGED_LIST}" | yq ".[${i}].directory")"
CONTENT=$(echo "${CHANGED_LIST}" | yq ".[${i}].content")
echo "CONTENT=${CONTENT}"
echo "NAME=${NAME}" # e.g) ./github/actions/dependabot/action.yaml
echo "${CONTENT}" > "${NAME}"
echo "DIRECTORY_NAME=${DIRECTORY_NAME}" # e.g) ./, ./example, ./example-ts, ...
echo "FILE_NAME=${FILE_NAME}" # e.g) package.json, .github/workflow/test.yaml
echo "${CONTENT}" > "${DIRECTORY_NAME%/}/${FILE_NAME}"
done
env:
CONFIG_FILE_PATH: ${{ inputs.config_file_path }}
7 changes: 4 additions & 3 deletions .github/workflows/_update-deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ jobs:
- name: Set Git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- uses: vdaas/vald-client-ci/.github/actions/dependabot@main
with:
config_file_path: ${{ inputs.config_file_path }}
# NOTE: When running dependabot cli, if the gpg action is set before the dependabot action, it fails during Node.js dependency updates
- uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
- uses: vdaas/vald-client-ci/.github/actions/dependabot@main
with:
config_file_path: ${{ inputs.config_file_path }}
- name: Check difference
id: check_diff
run: |
Expand Down

0 comments on commit 8b42a3d

Please sign in to comment.