Skip to content

Commit

Permalink
Separate GitHub action per example (#228)
Browse files Browse the repository at this point in the history
* Remove files with all workflows

* Create single workflow per app
  • Loading branch information
gcatanese authored Sep 13, 2024
1 parent 41f995e commit 0239e96
Show file tree
Hide file tree
Showing 18 changed files with 545 additions and 317 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build-authorisation-adjustment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Authorisation Adjustment

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'authorisation-adjustment-example/**'
pull_request:
branches: [ main ]
paths:
- 'authorisation-adjustment-example/**'

jobs:

build-authorisation-adjustment:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' ]
name: authorisation-adjustment-example build with Java ${{ matrix.Java }}
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Grant execute permission for gradlew
run: chmod +x authorisation-adjustment-example/gradlew
- name: Build with Gradle
run: cd authorisation-adjustment-example; ./gradlew build
32 changes: 32 additions & 0 deletions .github/workflows/build-checkout-advanced.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Checkout Advanced

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'checkout-example-advanced/**'
pull_request:
branches: [ main ]
paths:
- 'checkout-example-advanced/**'

jobs:

build-checkout-advanced:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' ]
name: checkout-example-advanced build with Java ${{ matrix.Java }}
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Grant checkout-example-advanced execute permission for gradlew
run: chmod +x checkout-example-advanced/gradlew
- name: Build checkout-example-advanced with Gradle
run: cd checkout-example-advanced; ./gradlew build
31 changes: 31 additions & 0 deletions .github/workflows/build-checkout.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build Checkout

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'checkout-example/**'
pull_request:
branches: [ main ]
paths:
- 'checkout-example/**'

jobs:
build-checkout:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' ]
name: checkout-example build with Java ${{ matrix.Java }}
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Grant checkout-example execute permission for gradlew
run: chmod +x checkout-example/gradlew
- name: Build checkout-example with Gradle
run: cd checkout-example; ./gradlew build
32 changes: 32 additions & 0 deletions .github/workflows/build-giftcard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Giftcard

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'giftcard-example/**'
pull_request:
branches: [ main ]
paths:
- 'giftcard-example/**'

jobs:

build-giftcard:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' ]
name: giftcard-example build with Java ${{ matrix.Java }}
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Grant giftcard-example execute permission for gradlew
run: chmod +x giftcard-example/gradlew
- name: Build giftcard-example with Gradle
run: cd giftcard-example; ./gradlew build
33 changes: 33 additions & 0 deletions .github/workflows/build-giving.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build Giving

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'giving-example/**'
pull_request:
branches: [ main ]
paths:
- 'giving-example/**'

jobs:

build-giving:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' ]
name: giving-example build with Java ${{ matrix.Java }}
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Grant execute permission for gradlew
run: chmod +x giving-example/gradlew
- name: Build with Gradle
run: cd giving-example; ./gradlew build

33 changes: 33 additions & 0 deletions .github/workflows/build-in-person-payments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build In-Person Payments

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'in-person-payments-example/**'
pull_request:
branches: [ main ]
paths:
- 'in-person-payments-example/**'

jobs:

build-in-person-payments:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' ]
name: in-person-payments-example build with Java ${{ matrix.Java }}
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Grant execute permission for gradlew
run: chmod +x in-person-payments-example/gradlew
- name: Build with Gradle
run: cd in-person-payments-example; ./gradlew build

33 changes: 33 additions & 0 deletions .github/workflows/build-paybylink.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build PayByLink

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'paybylink-example/**'
pull_request:
branches: [ main ]
paths:
- 'paybylink-example/**'

jobs:

build-paybylinks:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' ]
name: paybylink-example build with Java ${{ matrix.Java }}
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Grant execute permission for gradlew
run: chmod +x paybylink-example/gradlew
- name: Build with Gradle
run: cd paybylink-example; ./gradlew build

32 changes: 32 additions & 0 deletions .github/workflows/build-subscription.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Subscription

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'subscription-example/**'
pull_request:
branches: [ main ]
paths:
- 'subscription-example/**'

jobs:

build-subscription:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' ]
name: subscription-example build with Java ${{ matrix.Java }}
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Grant execute permission for gradlew
run: chmod +x subscription-example/gradlew
- name: Build with Gradle
run: cd subscription-example; ./gradlew build
Loading

0 comments on commit 0239e96

Please sign in to comment.