This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
Red Hat Automation Hub - Keep token alive #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "Red Hat Automation Hub - Keep token alive" | |
# The SSO token to upload content to Automation Hub must be accessed once every 30 days or it will be turned off | |
"on": | |
schedule: | |
- cron: '0 12 1,15 * *' # run 12pm on the 1st and 15th of the month | |
jobs: | |
keep_rh_sso_token_alive: | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Run curl command" | |
run: | | |
curl ${{ secrets.RH_AUTOMATION_HUB_URL }} \ | |
-d grant_type=refresh_token \ | |
-d client_id="cloud-services" \ | |
-d refresh_token="${{ secrets.RH_AUTOMATION_HUB_TOKEN }}" \ | |
--fail --silent --show-error --output /dev/null |