Skip to content

Commit ba706c0

Browse files
committed
added example to readme
1 parent b04f8f7 commit ba706c0

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
11
## Jenkins Job Builder action
22

33
This action launches [Jenkins Job Builder](https://jenkins-job-builder.readthedocs.io/en/latest/) to update your Jenkins jobs.
4+
5+
## Example
6+
7+
```yaml
8+
name: jjb
9+
10+
on: [push]
11+
12+
jobs:
13+
jjb:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: devopsx/gha-jjb@master
18+
with:
19+
jenkins_token: ${{ secrets.JENKINS_TOKEN }}
20+
jjb_yml: jenkins/jobs.yml
21+
jjb_ini: jenkins/jenkins_jobs.ini
22+
```
23+
24+
## Configuration
25+
26+
1. Create Jenkins [API token](https://www.jenkins.io/blog/2018/07/02/new-api-token-system/).
27+
2. Create `JENKINS_TOKEN` [secret](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository) in repo settings.
28+
3. Add gha yaml, as described above. That's it!

0 commit comments

Comments
 (0)