-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from Myongji-Graduate/fetch-ax-cicd
feat: fetch-ax 자동 업데이트 구현
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Handle fetch-ax Update | ||
|
||
on: | ||
repository_dispatch: | ||
types: [fetch-ax-updated] | ||
|
||
jobs: | ||
handle-update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.11.1' | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: Cache npm dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm-cache- | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Update fetch-ax to the latest version | ||
run: | | ||
git branch fetch-ax-update | ||
git checkout fetch-ax-update | ||
npm install fetch-ax@latest | ||
- name: Commit changes | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
git add package.json package-lock.json | ||
git commit -m "setting: update fetch-ax to the latest version" | ||
- name: Push changes | ||
run: git push origin fetch-ax-update | ||
|
||
- name: Create pull request | ||
uses: thomaseizinger/create-pull-request@master | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
head: fetch-ax-update | ||
base: main | ||
title: 'Update fetch-ax to the latest version' |