Skip to content

Commit

Permalink
Template repository changes: remal/oss-template
Browse files Browse the repository at this point in the history
  • Loading branch information
remal-gradle-plugins committed Nov 15, 2024
1 parent 0de9303 commit e3e6fa8
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 64 deletions.
27 changes: 7 additions & 20 deletions .github/workflows/bump-repository-activity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ env:
PUSH_BACK_TOKEN: ${{secrets.PUSH_BACK_TOKEN}}

jobs:
rate-limits:
name: Check rate limits
bump-repository-activity:
name: Bump repository activity
runs-on: ubuntu-latest
timeout-minutes: 5
concurrency:
Expand All @@ -24,14 +24,14 @@ jobs:
steps:
- name: Get rate limits
uses: remal-github-actions/get-rate-limits@v1
id: getRateLimits
id: rate-limits
with:
githubToken: ${{env.PUSH_BACK_TOKEN || github.token}}
- name: Make decision
- name: Make rate limits decision
id: decision
run: |
echo "Core rate limit usage: ${{steps.getRateLimits.outputs.coreUsage}}"
if [ "${{steps.getRateLimits.outputs.coreUsage < 75}}" == "true" ]; then
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
Expand All @@ -41,22 +41,9 @@ jobs:
fi
echo 'enough=false' >> $GITHUB_OUTPUT
fi
outputs:
enough: ${{steps.decision.outputs.enough}}
bump-repository-activity:
needs:
- rate-limits
if: ${{github.event_name != 'schedule' || fromJSON(needs.rate-limits.outputs.enough) == true}}
name: Bump repository activity
runs-on: ubuntu-latest
timeout-minutes: 5
concurrency:
group: bump-repository-activity
cancel-in-progress: true
steps:
- name: Bump repository activity
if: ${{env.PUSH_BACK_TOKEN}}
if: ${{env.PUSH_BACK_TOKEN && (github.event_name != 'schedule' || fromJSON(steps.decision.outputs.enough) == true)}}
uses: remal-github-actions/bump-repository-activity@v1
with:
githubToken: ${{env.PUSH_BACK_TOKEN}}
Expand Down
30 changes: 9 additions & 21 deletions .github/workflows/check-action-secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@ defaults:
shell: bash

jobs:
rate-limits:
name: Check rate limits
check-action-secrets:
name: Check action secrets
runs-on: ubuntu-latest
timeout-minutes: 5
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: getRateLimits
id: rate-limits
with:
githubToken: ${{secrets.LIST_SECRETS || github.token}}
- name: Make decision
githubToken: ${{env.PUSH_BACK_TOKEN || github.token}}
- name: Make rate limits decision
id: decision
run: |
echo "Core rate limit usage: ${{steps.getRateLimits.outputs.coreUsage}}"
if [ "${{steps.getRateLimits.outputs.coreUsage < 75}}" == "true" ]; then
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
Expand All @@ -43,21 +43,9 @@ jobs:
fi
echo 'enough=false' >> $GITHUB_OUTPUT
fi
outputs:
enough: ${{steps.decision.outputs.enough}}
check-action-secrets:
needs:
- rate-limits
if: ${{github.event_name != 'schedule' || fromJSON(needs.rate-limits.outputs.enough) == true}}
name: Check action secrets
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
group: check-action-secrets
cancel-in-progress: true
steps:
- 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}}
6 changes: 3 additions & 3 deletions .github/workflows/codeowners-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ jobs:
steps:
- name: Get rate limits
uses: remal-github-actions/get-rate-limits@v1
id: getRateLimits
id: rate-limits
with:
githubToken: ${{env.VALIDATION_TOKEN || github.token}}
- name: Make decision
id: decision
run: |
echo "Core rate limit usage: ${{steps.getRateLimits.outputs.coreUsage}}"
if [ "${{steps.getRateLimits.outputs.coreUsage < 75}}" == "true" ]; then
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
Expand Down
28 changes: 8 additions & 20 deletions .github/workflows/rebase-dependabot-pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ env:
PUSH_BACK_TOKEN: ${{secrets.PUSH_BACK_TOKEN || github.token}}

jobs:
rate-limits:
name: Check rate limits
rebase-dependabot-pull-requests:
name: Rebase Dependabot pull requests
runs-on: ubuntu-latest
timeout-minutes: 5
timeout-minutes: 15
concurrency:
group: rebase-dependabot-pull-requests
cancel-in-progress: true
steps:
- name: Get rate limits
uses: remal-github-actions/get-rate-limits@v1
id: getRateLimits
id: rate-limits
with:
githubToken: ${{env.PUSH_BACK_TOKEN || github.token}}
- name: Make decision
- name: Make rate limits decision
id: decision
run: |
echo "Core rate limit usage: ${{steps.getRateLimits.outputs.coreUsage}}"
if [ "${{steps.getRateLimits.outputs.coreUsage < 75}}" == "true" ]; then
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
Expand All @@ -46,21 +46,9 @@ jobs:
fi
echo 'enough=false' >> $GITHUB_OUTPUT
fi
outputs:
enough: ${{steps.decision.outputs.enough}}
rebase-dependabot-pull-requests:
needs:
- rate-limits
if: ${{github.event_name != 'schedule' || fromJSON(needs.rate-limits.outputs.enough) == true}}
name: Rebase Dependabot pull requests
runs-on: ubuntu-latest
timeout-minutes: 15
concurrency:
group: rebase-dependabot-pull-requests
cancel-in-progress: true
steps:
- name: Rebase Dependabot pull requests
if: ${{github.event_name != 'schedule' || fromJSON(steps.decision.outputs.enough) == true}}
uses: remal-github-actions/rebase-dependabot-pull-requests@v1
with:
githubToken: ${{env.PUSH_BACK_TOKEN}}
1 change: 1 addition & 0 deletions .github/workflows/sync-with-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
fi
echo 'enough=false' >> $GITHUB_OUTPUT
fi
- name: Sync with template repository
if: ${{env.PUSH_BACK_TOKEN && (github.event_name != 'schedule' || fromJSON(steps.decision.outputs.enough) == true)}}
uses: remal-github-actions/sync-with-template@v3
Expand Down

0 comments on commit e3e6fa8

Please sign in to comment.