Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions .github/workflows/cfdeploy.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: Deploy to Cloud Foundry
name: Deploy

on:
pull_request:
types: [closed]
branches:
- develop
workflow_dispatch:

permissions:
pull-requests: read

jobs:
deploy:
if: github.event.pull_request.merged == true
Deploy:
runs-on: ubuntu-latest

steps:
- name: Use Node.js 20.x
uses: actions/setup-node@v4
Expand All @@ -20,11 +18,14 @@ jobs:

- name: Login to Cloud Foundry
run: |
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
sudo apt-get update
sudo apt-get install cf8-cli
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key \
| sudo tee /etc/apt/trusted.gpg.d/cloudfoundry.asc
echo "deb https://packages.cloudfoundry.org/debian stable main" \
| sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
sudo apt update
sudo apt install cf-cli
cf login -a ${{ secrets.CF_API }} -u ${{ secrets.CF_USER }} -p ${{ secrets.CF_PASSWORD }} -o ${{ secrets.CF_ORG }} -s ${{ secrets.CF_SPACE }}

- name: Clone and prepare projects & Build and deploy
run: |
git clone --single-branch --branch develop https://github.com/cap-js/sdm.git
Expand All @@ -37,7 +38,7 @@ jobs:
mv *.tgz ../incidents-app
cd ../incidents-app
npm i *.tgz

- name: Build and deploy
run: |
cd incidents-app
Expand All @@ -47,4 +48,4 @@ jobs:
npm i @sap/cds-dk -g
mbt build
cf install-plugin multiapps -f
cf deploy mta_archives/sdmincidents_1.0.0.mtar -f
cf deploy mta_archives/sdmincidents_1.0.0.mtar -f
9 changes: 3 additions & 6 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: Integration Test

on:
workflow_run:
workflows: ['Deploy to Cloud Foundry']
types: [completed]
branches:
- 'develop'
workflow_dispatch:

permissions:
pull-requests: read

jobs:
integration-test:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
- name: Checkout repository
Expand Down