Skip to content

Commit

Permalink
feat: fetch-ax 자동 업데이트 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
gahyuun committed Dec 22, 2024
1 parent 8e4dfcd commit 530a6cb
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/fetch-ax-update.yml
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'

0 comments on commit 530a6cb

Please sign in to comment.