Skip to content

Template repository changes: remal-gradle-plugins/template (#3) #6

Template repository changes: remal-gradle-plugins/template (#3)

Template repository changes: remal-gradle-plugins/template (#3) #6

name: Check action secrets
on:
push:
paths:
- '.github/workflows/*.yml'
branches:
- 'main'
- 'master'
schedule:
- cron: '56 22 * * *' # sync-with-template: adjust
workflow_dispatch: { }
defaults:
run:
shell: bash
jobs:
check-action-secrets:
name: Check action secrets
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
group: check-action-secrets
cancel-in-progress: true
steps:
- name: Get rate limits
uses: remal-github-actions/get-rate-limits@v1
id: rate-limits
with:
githubToken: ${{env.PUSH_BACK_TOKEN || github.token}}
- name: Make rate limits decision
id: decision
run: |
echo "Core rate limit usage: ${{steps.rate-limits.outputs.coreUsage}}"
if [ "${{steps.rate-limits.outputs.coreUsage < 75}}" == "true" ]; then
echo "Enough rate limits"
echo 'enough=true' >> $GITHUB_OUTPUT
else
echo "::warning::Not enough rate limits!"
if [ "${{github.event_name != 'schedule'}}" == "true" ]; then
echo "::warning::Executing anyway, as event is '${{github.event_name}}'"
fi
echo 'enough=false' >> $GITHUB_OUTPUT
fi
- name: Check action secrets
if: ${{github.event_name != 'schedule' || fromJSON(steps.decision.outputs.enough) == true}}
uses: remal-github-actions/check-action-secrets@v1
with:
githubToken: ${{secrets.LIST_SECRETS}}