Skip to content

Commit a9b8933

Browse files
committed
Add cron subscription example
Signed-off-by: Stefan Sauterleute <stefan.sauterleute@byteleaf.de>
1 parent 3f0c7e1 commit a9b8933

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
*Deploy a Job: `deploy-job.yml`*: Deploy your Job to `Default` resource-group in `eu-de` to the project `MY-PROJECT` with its source code in the root of the repository the name of the job is`my-job`.
6565

6666
```yaml
67-
name: Deploy App to Code Engine
67+
name: Deploy Job to Code Engine
6868
6969
on:
7070
push:
@@ -161,3 +161,41 @@ jobs:
161161
cpu: 1
162162
memory: 4G
163163
```
164+
*Deploy a Job: `deploy-job.yml`*: Deploy your Job to `Default` resource-group in `eu-de` to the project `MY-PROJECT` with its source code in the root of the repository the name of the job is`my-job`.
165+
166+
```yaml
167+
name: Deploy Cron Subscription to Code Engine
168+
169+
on:
170+
push:
171+
branches:
172+
- main
173+
workflow_dispatch:
174+
175+
jobs:
176+
177+
deploy-job:
178+
runs-on: ubuntu-latest
179+
steps:
180+
- name: Check out code
181+
uses: actions/checkout@v3
182+
183+
- name: Deploy Cron Subscription to Code Engine
184+
uses: IBM/code-engine-github-action@v1
185+
with:
186+
api-key: ${{ secrets.IBM_IAM_API_KEY }}
187+
resource-group: 'Default'
188+
region: 'eu-de'
189+
project: 'MY-PROJECT'
190+
component: 'sub'
191+
subscription-type: 'cron'
192+
destination-type: 'app'
193+
destination: 'my-app'
194+
path: '/events'
195+
extension: 'extA=A'
196+
schedule: '*/2 * * * *'
197+
name: 'my-cron-sub'
198+
build-source: './'
199+
cpu: 1
200+
memory: 4G
201+
```

0 commit comments

Comments
 (0)