Skip to content

Réactiver Step 0 pour le test final #1

Réactiver Step 0 pour le test final

Réactiver Step 0 pour le test final #1

Workflow file for this run

name: Recover Step 0
on:
push:
branches:
- main
paths:
- ".github/workflows/recover-step0.yml"
permissions:
actions: write
jobs:
enable:
runs-on: ubuntu-latest
steps:
- name: Enable Step 0
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
state="$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/0-start-exercise.yml" --jq '.state')"
if [ "$state" != "active" ]; then
gh api --method PUT "repos/${GITHUB_REPOSITORY}/actions/workflows/0-start-exercise.yml/enable"
fi