Skip to content

Commit

Permalink
update yml to get desc
Browse files Browse the repository at this point in the history
  • Loading branch information
crane-hiromu committed Sep 28, 2024
1 parent 5a964e2 commit 9be0ae6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/create_x_post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# 最新のファイル名を取得し、.mdを取り除く
LATEST_FILENAME="${LATEST_FILE}-$(ls ${LATEST_FILE}-*.md | awk -F '-' '{print $2}')"
LATEST_FILENAME_NO_EXT="${LATEST_FILENAME%.md}" # .mdを削除
LATEST_FILENAME_NO_EXT="${LATEST_FILENAME%.md}"
# 結果をGitHub Actionsの出力として設定
echo "Latest file name without extension: $LATEST_FILENAME_NO_EXT"
Expand All @@ -42,11 +42,9 @@ jobs:
FILE_CONTENT=$(cat "$LATEST_FILENAME")
# descriptionの内容を抽出
echo "description: $DESCRIPTION"
DESCRIPTION=$(echo "$FILE_CONTENT" | awk '/^description:/ {print substr($0, index($0, $2))}')
echo "description=${DESCRIPTION}" >> $GITHUB_ENV # 環境変数に設定
echo "::set-output name=latest_filename::$LATEST_FILENAME"
echo "::set-output name=description::$DESCRIPTION"
echo "description=${DESCRIPTION}" >> $GITHUB_ENV
# - name: Install dependencies
# run: |
Expand Down

0 comments on commit 9be0ae6

Please sign in to comment.