Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaguiar authored May 21, 2023
1 parent e4230fd commit 955c0f2
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,65 @@
# ojob-action
OpenAF's oJob GitHub action

## Usage

### Example of a GitHub action to run an ojob.io job:

````yaml
on: [push]

jobs:
Test:
runs-on: ubuntu-latest
name: Get env variables
steps:
- uses: actions/checkout@v3
- uses: nmaguiar/myOJobs@nightly
with:
ojob: 'ojob.io/envs'
````

### Example of a GitHub action to run an ojob.io job with arguments:

````yaml
on: [push]

jobs:
Test:
runs-on: ubuntu-latest
name: Echo arguments
steps:
- uses: actions/checkout@v3
- uses: nmaguiar/myOJobs@nightly
with:
ojob: 'ojob.io/echo'
args: 'abc=123 xyz=abc'
````

### Example of a GitHub action to retrieve the installed version and distribution of OpenAF:

````yaml
on: [push]

jobs:
Test:
runs-on: ubuntu-latest
name: Get version
steps:
- uses: actions/checkout@v3
- run : |
cat <<EOF > getVersion.yaml
todo:
- check version
jobs:
- name: check version
exec: |
var data = { version: getVersion(), distribution: getDistribution() }
ow.oJob.output(data, args)
EOF
- uses: openaf/ojob-action@v1
with:
ojob: 'getVersion.yaml'
dist: 'nightly'
````

0 comments on commit 955c0f2

Please sign in to comment.