Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/1-step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ jobs:

- name: Passer au workflow suivant
run: |
gh workflow disable "${{ github.workflow }}"
gh workflow enable "Step 2"
gh api --method PUT "repos/${GITHUB_REPOSITORY}/actions/workflows/1-step.yml/disable"
next_state="$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/2-step.yml" --jq '.state')"
if [ "$next_state" != "active" ]; then
gh api --method PUT "repos/${GITHUB_REPOSITORY}/actions/workflows/2-step.yml/enable"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 5 additions & 2 deletions .github/workflows/2-step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ jobs:

- name: Passer au workflow suivant
run: |
gh workflow disable "${{ github.workflow }}"
gh workflow enable "Step 3"
gh api --method PUT "repos/${GITHUB_REPOSITORY}/actions/workflows/2-step.yml/disable"
next_state="$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/3-step.yml" --jq '.state')"
if [ "$next_state" != "active" ]; then
gh api --method PUT "repos/${GITHUB_REPOSITORY}/actions/workflows/3-step.yml/enable"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 5 additions & 2 deletions .github/workflows/3-step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ jobs:

- name: Passer au workflow suivant
run: |
gh workflow disable "${{ github.workflow }}"
gh workflow enable "Step 4"
gh api --method PUT "repos/${GITHUB_REPOSITORY}/actions/workflows/3-step.yml/disable"
next_state="$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/4-last-step.yml" --jq '.state')"
if [ "$next_state" != "active" ]; then
gh api --method PUT "repos/${GITHUB_REPOSITORY}/actions/workflows/4-last-step.yml/enable"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/4-last-step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
file: ${{ env.REVIEW_FILE }}

- name: Désactiver le dernier workflow
run: gh workflow disable "${{ github.workflow }}"
run: gh api --method PUT "repos/${GITHUB_REPOSITORY}/actions/workflows/4-last-step.yml/disable"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
3 changes: 3 additions & 0 deletions playground/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ Voici ton bac à sable pour le premier commit.
- Édite ce fichier sur **ta branche** `my-first-branch`
- Ajoute 2–3 lignes sur toi et inclus le mot **Hello**
- Enregistre, committe, puis pousse ta branche

Hello, je teste le parcours GitHub Basics.
Ce commit valide automatiquement l'étape 2 du cours.
Loading