|
1 | | -name: Update Yonode Package |
2 | | - |
3 | | -on: |
4 | | - schedule: |
5 | | - # Runs every 5 minutes |
6 | | - - cron: '*/5 * * * *' |
7 | | - workflow_dispatch: |
8 | | - |
9 | | -jobs: |
10 | | - update-yonode: |
11 | | - runs-on: ubuntu-latest |
12 | | - steps: |
13 | | - - name: Checkout repository |
14 | | - uses: actions/checkout@v3 |
15 | | - with: |
16 | | - fetch-depth: 0 # Important to fetch all history for branch operations |
17 | | - |
18 | | - - name: Set up Node.js |
19 | | - uses: actions/setup-node@v3 |
20 | | - with: |
21 | | - node-version: '16' |
22 | | - |
23 | | - - name: Change directory to yonode |
24 | | - run: cd packages/yonode-templates/JS-MongoDB-Mongoose-Auth-Template |
25 | | - |
26 | | - - name: Install npm-check-updates |
27 | | - run: npm install -g npm-check-updates |
28 | | - |
29 | | - - name: Check for updated packages |
30 | | - run: ncu -u |
31 | | - |
32 | | - - name: Install updated packages |
33 | | - run: npm install |
34 | | - |
35 | | - - name: Commit updated package.json and package-lock.json |
36 | | - run: | |
37 | | - git config --local user.email "[email protected]" |
38 | | - git config --local user.name "GitHub Action" |
39 | | - git add package.json package-lock.json |
40 | | - git diff-index --quiet HEAD || git commit -m "Update dependencies" |
41 | | -
|
42 | | - - name: Push changes |
43 | | - run: | |
44 | | - git checkout -b update-yonode-dependencies |
45 | | - git push -u origin update-yonode-dependencies |
46 | | - - name: Push to Status Check-Protected Branches |
47 | | - |
48 | | - |
49 | | - - name: Create Pull Request for updated package.json |
50 | | - uses: peter-evans/create-pull-request@v4 |
51 | | - with: |
52 | | - commit-message: Update dependencies in Yonode |
53 | | - title: 'Update Yonode dependencies' |
54 | | - body: 'This pull request updates dependencies for the Yonode package.' |
55 | | - branch: 'update-yonode-dependencies' |
56 | | - base: 'main' |
57 | | - labels: 'dependencies' |
58 | | - token: ${{ secrets.GITHUB_TOKEN }} |
59 | | - |
60 | | - - name: Check outputs |
61 | | - run: echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" |
| 1 | +# name: Update Yonode Package |
| 2 | + |
| 3 | +# on: |
| 4 | +# schedule: |
| 5 | +# # Runs every 5 minutes |
| 6 | +# - cron: '*/5 * * * *' |
| 7 | +# workflow_dispatch: |
| 8 | + |
| 9 | +# jobs: |
| 10 | +# update-yonode: |
| 11 | +# runs-on: ubuntu-latest |
| 12 | +# steps: |
| 13 | +# - name: Checkout repository |
| 14 | +# uses: actions/checkout@v3 |
| 15 | +# with: |
| 16 | +# fetch-depth: 0 # Important to fetch all history for branch operations |
| 17 | + |
| 18 | +# - name: Set up Node.js |
| 19 | +# uses: actions/setup-node@v3 |
| 20 | +# with: |
| 21 | +# node-version: '16' |
| 22 | + |
| 23 | +# - name: Change directory to yonode |
| 24 | +# run: cd packages/yonode-templates/JS-MongoDB-Mongoose-Auth-Template |
| 25 | + |
| 26 | +# - name: Install npm-check-updates |
| 27 | +# run: npm install -g npm-check-updates |
| 28 | + |
| 29 | +# - name: Check for updated packages |
| 30 | +# run: ncu -u |
| 31 | + |
| 32 | +# - name: Install updated packages |
| 33 | +# run: npm install |
| 34 | + |
| 35 | +# - name: Commit updated package.json and package-lock.json |
| 36 | +# run: | |
| 37 | +# git config --local user.email "[email protected]" |
| 38 | +# git config --local user.name "GitHub Action" |
| 39 | +# git add package.json package-lock.json |
| 40 | +# git diff-index --quiet HEAD || git commit -m "Update dependencies" |
| 41 | + |
| 42 | +# - name: Push changes |
| 43 | +# run: | |
| 44 | +# git checkout -b update-yonode-dependencies |
| 45 | +# git push -u origin update-yonode-dependencies |
| 46 | +# - name: Push to Status Check-Protected Branches |
| 47 | +# uses: CasperWA/[email protected] |
| 48 | + |
| 49 | +# - name: Create Pull Request for updated package.json |
| 50 | +# uses: peter-evans/create-pull-request@v4 |
| 51 | +# with: |
| 52 | +# commit-message: Update dependencies in Yonode |
| 53 | +# title: 'Update Yonode dependencies' |
| 54 | +# body: 'This pull request updates dependencies for the Yonode package.' |
| 55 | +# branch: 'update-yonode-dependencies' |
| 56 | +# base: 'main' |
| 57 | +# labels: 'dependencies' |
| 58 | +# token: ${{ secrets.GITHUB_TOKEN }} |
| 59 | + |
| 60 | +# - name: Check outputs |
| 61 | +# run: echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" |
0 commit comments