[Snyk] Upgrade marked from 4.3.0 to 14.1.1 #14
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: PR actions | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
fix-format: | |
name: /fix:format | |
runs-on: ubuntu-latest | |
if: | | |
github.event.issue.pull_request && | |
contains(github.event.comment.body, '/fix:format') | |
permissions: | |
contents: write | |
env: | |
PR_NUM: ${{ github.event.issue.number }} | |
COMMENT: ${{ github.event.comment.body }} | |
steps: | |
- name: Context info | |
run: | | |
echo $PR_NUM | |
echo $COMMENT | |
- uses: actions/checkout@v3 | |
- run: gh pr checkout $PR_NUM | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Create NPM cache-hash input file | |
run: | | |
mkdir -p tmp | |
jq '{devDependencies, dependencies, engines, gitHubActionCacheKey}' package.json > tmp/package-ci.json | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
cache-dependency-path: tmp/package-ci.json | |
- run: | | |
npm run format | |
git status | |
git branch -v | |
- name: Commit and push changes, if any | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "opentelemetrybot" | |
git add -A | |
if [[ $(git status --porcelain) ]]; then | |
git commit -m 'Results from /fix:format' | |
git push | |
else | |
echo "No changes to commit" | |
fi | |
env: | |
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} | |
fix-refcache: | |
name: /fix:refcache | |
runs-on: ubuntu-latest | |
if: | | |
github.event.issue.pull_request && | |
contains(github.event.comment.body, '/fix:refcache') | |
permissions: | |
contents: write | |
env: | |
PR_NUM: ${{ github.event.issue.number }} | |
COMMENT: ${{ github.event.comment.body }} | |
DEPTH: --depth 100 # submodule clone depth | |
steps: | |
- name: Context info | |
run: | | |
echo $PR_NUM | |
echo $COMMENT | |
- uses: actions/checkout@v3 | |
- run: gh pr checkout $PR_NUM | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Create NPM cache-hash input file | |
run: | | |
mkdir -p tmp | |
jq '{devDependencies, dependencies, engines, gitHubActionCacheKey}' package.json > tmp/package-ci.json | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
cache-dependency-path: tmp/package-ci.json | |
- run: npm install --omit=optional | |
- run: | | |
npm run check:links | |
git status | |
git branch -v | |
- name: Commit and push changes, if any | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "opentelemetrybot" | |
git add -A | |
if [[ $(git status --porcelain) ]]; then | |
git commit -m 'Results from /fix:recache' | |
git push | |
else | |
echo "No changes to commit" | |
fi | |
env: | |
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} |