Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe fix npm diff #283

Draft
wants to merge 16 commits into
base: develop
Choose a base branch
from
Draft
46 changes: 28 additions & 18 deletions .github/workflows/composer-npm-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ on:
pull_request:
paths:
- 'composer.lock'
# - 'package-lock.json'
- 'package-lock.json'
- '.github/workflows/composer-npm-diff.yml'
permissions:
contents: write
pull-requests: write
Expand All @@ -27,20 +28,29 @@ jobs:
<strong>Composer Changes</strong>

${{ steps.composer_diff.outputs.composer_diff }}
# Removing because the workflow fails for some unknown reason, see https://github.com/pantheon-systems/pantheon-advanced-page-cache/actions/runs/9228002744/job/25391128483
# There's no support for this action, so we might need to build something new.
# npm-diff:
# name: NPM Lockfile Diff
# runs-on: ubuntu-latest
# continue-on-error: true
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Compile NPM packages
# run: npm ci
# - name: NPM Lockfile Changes
# uses: codepunkt/npm-lockfile-changes@main
# with:
# token: ${{ github.token }}
npm-diff:
name: NPM Lockfile Diff
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Compile NPM packages
run: npm ci
- name: Set the Issue number for npm-lockfile-changes
id: set-issue-number-env
uses: actions/github-script@v6
with:
script: |
const issue_number = context.payload.pull_request.number;
core.exportVariable('GITHUB_ISSUE_NUMBER', issue_number);
# - name: Debug
# run: |
# echo "${{ toJson(github) }}" > github_context.json
# jq . github_context.json
- name: NPM Lockfile Changes
uses: codepunkt/npm-lockfile-changes@main
with:
token: ${{ github.token }}
38 changes: 21 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@
"scripts": {
"build": "gulp build",
"watch": "gulp watch"
},
"dependencies": {
}
}
Loading