[triple-document] StickyTabs element 추가 #300
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update CHANGELOG | |
on: | |
pull_request: | |
types: | |
- labeled | |
env: | |
COMMIT_USER_EMAIL: triple-bot@interpark.com | |
COMMIT_USER_NAME: TRIPLE Bot | |
CURRENT_VERSION: ${{ github.event.pull_request.milestone.title }} | |
NODE_VERSION: 'lts/*' | |
NPM_REGISTRY_URL: 'https://registry.npmjs.org' | |
NODE_AUTH_TOKEN: ${{ secrets.READ_ONLY_NPM_TOKEN }} | |
jobs: | |
update-changelog: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.label.name == 'release' }} | |
steps: | |
- name: Check if a milestone exists on PR | |
run: | | |
if [[ $(echo ${{ github.event.pull_request.milestone }}) == "" ]]; then | |
echo "마일스톤을 등록해 주세요." | |
exit 1 | |
fi | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.TRIPLE_BOT_GITHUB_TOKEN }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Setup Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: ${{ env.NPM_REGISTRY_URL }} | |
- name: Execute Changelog JavaScript | |
run: node scripts/changelog.js | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run prettier on CHANGELOG.md | |
run: npx prettier --no-config --write CHANGELOG.md | |
- name: Commit and push updated CHANGELOG | |
run: | | |
git config --local user.email "${{ env.COMMIT_USER_EMAIL }}" | |
git config --local user.name "${{ env.COMMIT_USER_NAME }}" | |
git add CHANGELOG.md | |
git commit -m "Update ${{ env.CURRENT_VERSION }} CHANGELOG" | |
git push |