Skip to content

auto-update-packages #74

auto-update-packages

auto-update-packages #74

Workflow file for this run

name: auto-update-packages
on:
schedule:
# Runs "At 00:00 on Saturday." (see https://crontab.guru)
- cron: '0 0 * * 6'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
NX_BASE: origin/main
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
jobs:
update:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: setup repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: setup environment variables
run: |
echo "COMMIT_MESSAGE=chore: auto updated dependencies on $(date +'%d/%m/%Y')" >> $GITHUB_ENV
- name: setup pnpm
uses: pnpm/action-setup@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache: "pnpm"
- name: log params
run: |
echo NX_BASE = $NX_BASE
echo node version = $(node --version)
echo pnpm version = $(pnpm --version)
echo COMMIT_MESSAGE = $COMMIT_MESSAGE
- name: update env
run: |
pnpm i
pnpm build:scripts
pnpm update:env
- name: update pnpm
uses: pnpm/action-setup@v4
- name: update node
uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache: "pnpm"
- name: log params
run: |
echo NX_BASE = $NX_BASE
echo node version = $(node --version)
echo pnpm version = $(pnpm --version)
echo COMMIT_MESSAGE = $COMMIT_MESSAGE
- name: update dependencies
run: |
pnpm test:config
- name: create or update pull request
uses: peter-evans/create-pull-request@v6
with:
reviewers: 'jhasuraj01'
branch: update-dependencies
base: main
title: ${{ env.COMMIT_MESSAGE }}
body: "This PR updates the dependencies automatically."
commit-message: ${{ env.COMMIT_MESSAGE }}