2023-05-11 11:20:04 +00:00
|
|
|
name: Token refresh cron
|
|
|
|
|
2023-05-11 10:07:56 +00:00
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *'
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
refresh:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
environment: ah
|
|
|
|
steps:
|
|
|
|
- name: Refresh to AH token
|
|
|
|
run: >-
|
|
|
|
curl https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
|
|
|
|
-d grant_type=refresh_token
|
|
|
|
-d client_id=cloud-services
|
|
|
|
-d refresh_token="${{ secrets.AH_TOKEN }}"
|
|
|
|
--fail --silent --show-error --output /dev/null
|