Skip to content

Commit 5fbc4ce

Browse files
committed
Execute some commands at GitHub Actions side
1 parent 0dfe816 commit 5fbc4ce

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

action.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ runs:
3737
ruby-version: "3.1"
3838
bundler-cache: true
3939

40+
- name: Install RubyGems
41+
run: bundle install --gemfile=$GITHUB_ACTION_PATH/Gemfile
42+
shell: sh
43+
env:
44+
GITHUB_ACTION_PATH: ${{ github.action_path }}
45+
4046
- id: get-added-files
4147
name: Get added files
4248
run: echo "::set-output name=files::$(git diff --name-only --diff-filter=A ${{ github.event.before }} ${{ github.sha }} | egrep "^${{ inputs.dir }}/" | xargs)"
@@ -53,11 +59,12 @@ runs:
5359
shell: sh
5460

5561
- name: Publish to Qiita
56-
run: ruby main.rb
62+
run: ruby $GITHUB_ACTION_PATH/main.rb
5763
shell: sh
5864
env:
5965
QIITA_ACCESS_TOKEN: ${{ inputs.qiita_access_token }}
6066
MAPPING_FILEPATH: ${{ inputs.mapping_filepath }}
67+
GITHUB_ACTION_PATH: ${{ github.action_path }}
6168
ADDED_FILES: ${{ steps.get-added-files.outputs.files }}
6269
MODIFIED_FILES: ${{ steps.get-modified-files.outputs.files }}
6370
DELETED_FILES: ${{ steps.get-deleted-files.outputs.files }}

0 commit comments

Comments
 (0)