-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1044 from Adyen/release/24.1.0
Release/24.1.0
- Loading branch information
Showing
175 changed files
with
1,333 additions
and
53,455 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Build cartridges | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
|
||
|
||
jobs: | ||
commit-the-cartridge-and-project-files: | ||
if: | | ||
github.event_name == 'pull_request' && | ||
contains(github.head_ref, 'release') && | ||
github.event.pull_request.base.ref == 'main' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- sfra-version: 'v6.1.0' | ||
sfcc-hostname-secret: 'SFCC_HOSTNAME_SFRA6' | ||
code-version-secret: 'SFCC_CODE_VERSION_SFRA6' | ||
steps: | ||
- name: Checkout SFRA code | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: SalesforceCommerceCloud/storefront-reference-architecture | ||
ref: ${{ matrix.sfra-version }} | ||
ssh-key: ${{ secrets.SERVICE_ACCOUNT_SSH_KEY }} | ||
path: storefront-reference-architecture | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
path: adyen-salesforce-commerce-cloud | ||
fetch-depth: 0 | ||
- name: Install SFRA dependencies | ||
working-directory: storefront-reference-architecture | ||
run: npm install | ||
- name: Install Adyen SFCC dependencies | ||
working-directory: adyen-salesforce-commerce-cloud | ||
run: npm install | ||
- name: Build the code | ||
working-directory: adyen-salesforce-commerce-cloud | ||
run: | | ||
npm run transpile && npm run compile:js | ||
mkdir -p $GITHUB_WORKSPACE/cartridges | ||
cp -R cartridges/* $GITHUB_WORKSPACE/cartridges | ||
shell: bash | ||
- name: Commit /cartridges folder | ||
if: success() | ||
run: | | ||
cd adyen-salesforce-commerce-cloud | ||
git config --local user.email "actions@github.com" | ||
git config --local user.name "GitHub Actions" | ||
git add cartridges/**/* | ||
git commit -m "chore: committing the built /cartridge folder" | ||
git fetch origin | ||
git push origin HEAD:${{ github.head_ref }} --force-with-lease | ||
- name: Commit .project files | ||
if: success() | ||
run: | | ||
cd adyen-salesforce-commerce-cloud/cartridges | ||
version=$(grep "^\s*VERSION:" int_adyen_overlay/cartridge/adyenConstants/constants.js | awk -F"'" '{print $2}' | tr -d '\n') | ||
version="v${version}" | ||
for name in "int_adyen_overlay" "int_adyen_SFRA" "bm_adyen"; do | ||
echo -e "<?xml version=\"1.0\" encoding=\"UTF-8\"?> | ||
<projectDescription> | ||
<name>${name}</name> | ||
<comment>${version}</comment> | ||
<projects></projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.demandware.studio.core.beehiveElementBuilder</name> | ||
<arguments></arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.demandware.studio.core.beehiveNature</nature> | ||
</natures> | ||
</projectDescription>" > "${name}/.project" | ||
done | ||
git add . | ||
git config --local user.email "actions@github.com" | ||
git config --local user.name "GitHub Actions" | ||
git commit -m "chore: committing the project files" | ||
git fetch origin | ||
git push origin HEAD:${{ github.head_ref }} --force-with-lease |
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
Oops, something went wrong.