Skip to content

Commit

Permalink
build(gha): add workflow to create build with specific pdk versions
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Jul 24, 2024
1 parent 62e50f0 commit 57f0a32
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build-custom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: '🔨 Build with custom pdk versions'
run-name: 'Build with pdk@${{ inputs.php-pdk-ref }} and js-pdk@${{ inputs.js-pdk-ref }}'

on:
workflow_dispatch:
inputs:
php-pdk-ref:
default: 'main'
description: 'Ref of myparcelnl/pdk to use'

js-pdk-ref:
default: 'main'
description: 'Ref of myparcelnl/js-pdk to use'

concurrency:
group: '${{ github.workflow }}-${{ github.ref }}-${{ inputs.php-pdk-ref }}-${{ inputs.js-pdk-ref }}'
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- uses: myparcelnl/actions/pdk-custom-build-prepare@v4
id: prepare
with:
js-pdk-ref: ${{ inputs.js-pdk-ref }}
php-pdk-ref: ${{ inputs.php-pdk-ref }}
source-hash: ${{ hashFiles('yarn.lock', 'composer.lock', 'src/**/*', 'config/**/*', 'woocommerce-myparcel.php', '**/scoper.inc.php', '**/scoper.*.inc.php') }}

- name: 'Build frontend'
uses: myparcelnl/actions/nx-run-many@v4
with:
target: 'build'

- uses: myparcelnl/actions/pdk-custom-build@v4
with:
image: ${{ steps.prepare.outputs.image }}
js-pdk-ref: ${{ inputs.js-pdk-ref }}
php-pdk-ref: ${{ inputs.php-pdk-ref }}

0 comments on commit 57f0a32

Please sign in to comment.