Adobe Developer App Builder support for GitHub actions. This action leverages AIO CLI to build, test and deploy App Builder applications.
This Github action supports following commands
- build - Builds App Builder application. This is similar to using
aio app build
command using AIO CLI - test - Test App Builder application. This is similar to using
aio app test
command using AIO CLI - deploy - Deploys App Builder application. This is similar to running
aio app deploy --skip-build
command using AIO CLI. Deploy Command also supports--no-publish
flag foraio app deploy
command to control publishing of Extensions. See usage section for more details. auth
- Generates IMS Token and adds that to Github Action Environment for AIO CLI to use. The token is required to build and deploy App Builder Extensions.
-
build
- Standalone App
- AIO_RUNTIME_NAMESPACE - namespace to be used for the App
- Extensions
- AIO_RUNTIME_NAMESPACE - namespace to be used for the App
- AUTH command should have been executed prior to build to make sure required token is available
- Standalone App
-
test
- None -
deploy
- Standalone App
- AIO_RUNTIME_NAMESPACE - namespace to be used for the App
- AIO_RUNTIME_AUTH - auth for abobe namespace
- Extensions
- AIO_RUNTIME_NAMESPACE - namespace to be used for the App
- AIO_RUNTIME_AUTH - auth for abobe namespace
- AIO_PROJECT_ID - Adobe I/O Console project ID
- AIO_PROJECT_NAME - Adobe I/O Console project name
- AIO_PROJECT_ORG_ID - IMS Org id
- AIO_PROJECT_WORKSPACE_ID - Workspace Id
- AIO_PROJECT_WORKSPACE_NAME - Workspace name
- AIO_PROJECT_WORKSPACE_DETAILS_SERVICES - list of services added to above workspace in following format (ex. '[{"code": "AdobeIOManagementAPISDK", "name": "I/O Management API"}]' )
- AUTH command should have been executed prior to build to make sure required token is available in case extensions are to be published. Else use noPublish command flag to disbale app publish
- Standalone App
-
auth
- Standalone App auth command is not required for standalone Apps
- Extensions
- CLIENTID - Client id for the Adobe I/O console project
- CLIENTSECRET - Client secret for the Adobe I/O console project
- TECHNICALACCOUNTID - Technical account Id for the Adobe I/O console project
- IMSORGID - IMS Org Id
- SCOPES - Comma separated list of required scopes for JWT token.
- KEY - Private key associated with project
You can include the action in your workflow as adobe/aio-apps-action@ Example :
name: AIO App CI
on:
release:
types: [released]
jobs:
deploy:
name: Deploy to Prod
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
matrix:
node-version: ['12']
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm i
- name: Setup CLI
uses: adobe/[email protected]
with:
os: ${{ matrix.os }}
version: 8.x.x
- name: Build
env:
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_PROD }}
uses: adobe/[email protected]
with:
os: ${{ matrix.os }}
command: build
- name: Deploy
env:
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_PROD }}
AIO_RUNTIME_AUTH: ${{ secrets.AIO_RUNTIME_AUTH_PROD }}
uses: adobe/[email protected]
with:
os: ${{ matrix.os }}
command: deploy
For Extensions
Set noPublish flag for Deploy command to true/false to control publishing of Extensions
name: AIO App CI
on:
release:
types: [released]
jobs:
deploy:
name: Deploy to Prod
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
matrix:
node-version: ['12']
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm i
- name: Setup CLI
uses: adobe/[email protected]
with:
os: ${{ matrix.os }}
version: 8.x.x
- name: Auth
uses: adobe/[email protected]
with:
os: ${{ matrix.os }}
command: auth
CLIENTID: ${{ secrets.CLIENTID_PROD }}
CLIENTSECRET: ${{ secrets.CLIENTSECRET_PROD }}
TECHNICALACCOUNTID: ${{ secrets.TECHNICALACCID_PROD }}
IMSORGID: ${{ secrets.IMSORGID_PROD }}
SCOPES: ${{ secrets.SCOPES_PROD }}
KEY: ${{ secrets.KEY_PROD }}
- name: Build
env:
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_PROD }}
uses: adobe/[email protected]
with:
os: ${{ matrix.os }}
command: build
- name: Deploy
env:
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_PROD }}
AIO_RUNTIME_AUTH: ${{ secrets.AIO_RUNTIME_AUTH_PROD }}
AIO_PROJECT_ID: ${{ secrets.AIO_PROJECT_ID_PROD }}
AIO_PROJECT_NAME: ${{ secrets.AIO_PROJECT_NAME_PROD }}
AIO_PROJECT_ORG_ID: ${{ secrets.AIO_PROJECT_ORG_ID_PROD }}
AIO_PROJECT_WORKSPACE_ID: ${{ secrets.AIO_PROJECT_WORKSPACE_ID_PROD }}
AIO_PROJECT_WORKSPACE_NAME: ${{ secrets.AIO_PROJECT_WORKSPACE_NAME_PROD }}
AIO_PROJECT_WORKSPACE_DETAILS_SERVICES: ${{ secrets.AIO_PROJECT_WORKSPACE_DETAILS_SERVICES_PROD }}
uses: adobe/[email protected]
with:
os: ${{ matrix.os }}
command: deploy
noPublish: false
If the aio project is not in the root directory of your repository, you can specify the working directory by passing workin-directory
as a string to the with
parameter in your workflow yaml file. Example:
- name: Build
env:
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_PROD }}
uses: adobe/[email protected]
with:
working-directory: './some-sub-dir'
os: ${{ matrix.os }}
command: build
Contributions are welcomed! Read the Contributing Guide for more information.
This project is licensed under the Apache V2 License. See LICENSE for more information.