keepalive #210
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: keepalive | |
on: | |
schedule: | |
- cron: '30 2 * * *' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
keepalive: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: check if any github actions got disabled due to inactivity | |
env: | |
GH_TOKEN: ${{ secrets.GH_PAT_WORKFLOW }} | |
run: | | |
for repo in $(gh repo list manjaro-sway --no-archived --visibility public --json name --limit 1000 | jq --raw-output '.[] | .name'); do gh workflow list --repo manjaro-sway/$repo --all --json id,state --jq '.[] | select(.state == "disabled_inactivity")' | jq -c '.id' | xargs -I % gh workflow enable --repo manjaro-sway/$repo %; done |