ionbazan / composer-diff-action Goto Github PK
View Code? Open in Web Editor NEWCompare composer.lock files and generate human-readable list of package changes
License: MIT License
Compare composer.lock files and generate human-readable list of package changes
License: MIT License
I just started using this action but it never posts a comment, even when there is output in the diff (because the exit code is 0). I think the issue is that the README is newer than the most recent release so the code that runs in the action doesn't match the posted docs. The needed PR is #5
When there is no changes to the lock file, an empty composer_diff
output is produced, but it's not truly empty.
See log of one oof my workflows:
##[debug]Evaluating: format('{0}
##[debug]', steps.composer_diff.outputs.composer_diff)
##[debug]Evaluating format:
##[debug]..Evaluating String:
##[debug]..=> '{0}
##[debug]'
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating Index:
##[debug]........Evaluating steps:
##[debug]........=> Object
##[debug]........Evaluating String:
##[debug]........=> 'composer_diff'
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'outputs'
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'composer_diff'
##[debug]..=> ''
##[debug]=> '
##[debug]'
##[debug]Result: '
##[debug]'
then marocchino/sticky-pull-request-comment@v2
fails with Error: Either message or path input is required
, but I cannot check if the output is an empty string like ''
and skip the step, because it's not an empty string
hi there!
You action works perfectly on my PR workflow, no problem there.
I'd like to commit a composer update on a schedule. here is my workflow:
'on':
schedule:
-
cron: '24 6 * * 1,2,3,4,5'
workflow_dispatch: null
jobs:
composer_update_job:
runs-on: ubuntu-latest
name: 'composer update'
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
-
name: 'Run composer update'
run: 'composer update --no-dev --no-progress'
id: run_composer
- name: Generate composer diff
id: composer_diff # To reference the output in comment
uses: IonBazan/composer-diff-action@v1
with:
no-dev: true
format: mdlist
-
name: 'Create Pull Request'
uses: peter-evans/create-pull-request@v4
id: cpr
with:
token: '${{ secrets.MERGE_TOKEN }}'
commit-message: ${{ steps.composer_diff.outputs.composer_diff }}
committer: 'Woogo Bot <[email protected]>'
author: 'Woogo Bot <[email protected]>'
branch: woogobot/composer-update
delete-branch: true
title: 'feat(plugins) composer update'
labels: 'composer update'
The output of ${{ steps.composer_diff.outputs.composer_diff }}
is empty there. However in the PR check, it will be correct.
What am I doing wrong here ?
Thanks!
Got error message today:
In PackageDiff.php line 135:
Could not open file ad66625dce6fd04da4b628f870a7230cce53fd10:apps/silverbac
k-drupal/composer.lock or find it in git as ad66625dce6fd04da4b628f870a7230
cce53fd10:apps/silverback-drupal/composer.lock
I tried to debug it by adding a new job step:
git show ad66625dce6fd04da4b628f870a7230cce53fd10:apps/silverback-drupal/composer.lock
This one worked without any issues.
Debugging here: AmazeeLabs/silverback-mono#1021
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.