Skip to content

Commit de02a81

Browse files
committed
Update workflow name and logic
1 parent d90d130 commit de02a81

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎.github/workflows/keepalive.yml‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,15 @@ jobs:
1212
actions: write
1313
steps:
1414
- uses: actions/checkout@v4
15-
- uses: gautamkrishnar/keepalive-workflow@v2
15+
- name: Re-enable workflow
16+
env:
17+
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN || github.token }}
18+
shell: sh
19+
run: |
20+
case "${GITHUB_WORKFLOW_REF:?}" in
21+
"${GITHUB_REPOSITORY:?}"/.github/workflows/*.y*ml@*) ;;
22+
*) false ;;
23+
esac
24+
workflow="${GITHUB_WORKFLOW_REF%%@*}"
25+
workflow="${workflow#${GITHUB_REPOSITORY}/.github/workflows/}"
26+
gh api -X PUT "repos/${GITHUB_REPOSITORY}/actions/workflows/${workflow}/enable"

0 commit comments

Comments
 (0)