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

Check build workflow with krankerl #10471

Open
kesselb opened this issue Dec 10, 2024 · 0 comments
Open

Check build workflow with krankerl #10471

kesselb opened this issue Dec 10, 2024 · 0 comments

Comments

@kesselb
Copy link
Contributor

kesselb commented Dec 10, 2024

Steps to reproduce

- name: Install composer dependencies
if: steps.check_composer.outputs.files_exists == 'true'
run: |
cd ${{ env.APP_NAME }}
composer install --no-dev
- name: Build ${{ env.APP_NAME }}
# Skip if no package.json
if: ${{ steps.versions.outputs.nodeVersion }}
env:
CYPRESS_INSTALL_BINARY: 0
run: |
cd ${{ env.APP_NAME }}
npm ci
npm run build --if-present
- name: Check Krankerl config
id: krankerl
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
with:
files: ${{ env.APP_NAME }}/krankerl.toml
- name: Install Krankerl
if: steps.krankerl.outputs.files_exists == 'true'
run: |
wget https://github.com/ChristophWurst/krankerl/releases/download/v0.14.0/krankerl_0.14.0_amd64.deb
sudo dpkg -i krankerl_0.14.0_amd64.deb
- name: Package ${{ env.APP_NAME }} ${{ env.APP_VERSION }} with krankerl
if: steps.krankerl.outputs.files_exists == 'true'
run: |
cd ${{ env.APP_NAME }}
krankerl package

The above workflow:

  1. composer i --no-dev
  2. npm ci, npm run build
  3. krankerl package seems to run composer i --no-dev, npm install and npm run build again.1

npm ci is preferred for production builds because it strictly adheres to the lockfile, whereas npm install may update packages, potentially causing unexpected results.

Expected behavior

  • Use npm ci
  • Don't build twice (the output is suppressed; hence I cannot confirm if that's really happening)

Actual behavior

Image

Footnotes

  1. https://github.com/nextcloud/mail/blob/93b0225e452fa20f89d33a3a7e8c3db33f5cc634/krankerl.toml#L4-L9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant