Skip to content

Commit 0120f67

Browse files
authored
Update README.md (#17)
1 parent 7ba41a8 commit 0120f67

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The simplest authentication method using username and password:
7575
This method leverages JWT Bearer token-based authentication:
7676

7777
```yaml
78-
name: JWT Bearer Flow using GitHub id_token
78+
name: JWT Bearer Flow
7979
on: [push]
8080
permissions:
8181
id-token: write # Required for requesting the GitHub JWT
@@ -96,12 +96,38 @@ jobs:
9696
run: cf apps
9797
```
9898

99+
By default the `cf` client will be used.
100+
101+
### Client Credentials
102+
103+
This method uses client credentials:
104+
105+
```yaml
106+
name: Client Credentials
107+
on: [push]
108+
jobs:
109+
deploy:
110+
runs-on: ubuntu-latest
111+
steps:
112+
- uses: actions/checkout@v4
113+
- uses: vchrisb/setup-cf@v2
114+
with:
115+
api: ${{ secrets.CF_API }}
116+
client_id: ${{ secrets.CF_CLIENT_ID }}
117+
client_secret: ${{ secrets.CF_CLIENT_SECRET }}
118+
grant_type: client_credentials
119+
org: test
120+
space: dev
121+
- name: run cf command
122+
run: cf apps
123+
```
124+
99125
### Client Credentials with JWT
100126

101127
This method uses client credentials with JWT verification:
102128

103129
```yaml
104-
name: Client Credentials using GitHub id_token
130+
name: Client Credentials with JWT
105131
on: [push]
106132
permissions:
107133
id-token: write # Required for requesting the GitHub JWT
@@ -114,7 +140,7 @@ jobs:
114140
- uses: vchrisb/setup-cf@v2
115141
with:
116142
api: ${{ secrets.CF_API }}
117-
client_id: setup-cf
143+
client_id: ${{ secrets.CF_CLIENT_ID }}
118144
grant_type: client_credentials
119145
jwt: ${{ secrets.JWT }} # can be omitted when using GitHub id token
120146
org: test

0 commit comments

Comments
 (0)