@@ -75,7 +75,7 @@ The simplest authentication method using username and password:
7575This method leverages JWT Bearer token-based authentication :
7676
7777` ` ` yaml
78- name: JWT Bearer Flow using GitHub id_token
78+ name: JWT Bearer Flow
7979on: [push]
8080permissions:
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
101127This method uses client credentials with JWT verification :
102128
103129` ` ` yaml
104- name: Client Credentials using GitHub id_token
130+ name: Client Credentials with JWT
105131on: [push]
106132permissions:
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