docs: add CI introduction #1
This file contains hidden or 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: CI Test Step 2 | |
| on: | |
| push: | |
| branches: | |
| - ci-my-first-branch | |
| paths: | |
| - playground/README.md | |
| permissions: | |
| contents: read | |
| issues: write | |
| env: | |
| STEP_3_FILE: ".github/steps/3-step.md" | |
| jobs: | |
| find_exercise: | |
| name: Retrouver l'Issue CI | |
| uses: ENSTASIMOV/exercise-toolkit-fr/.github/workflows/find-exercise-issue.yml@main | |
| with: | |
| issue-title-text: "Exercice : GitHub Basics CI" | |
| check_step_work: | |
| name: Vérifier le commit | |
| runs-on: ubuntu-latest | |
| needs: [find_exercise] | |
| env: | |
| ISSUE_REPOSITORY: ${{ github.repository }} | |
| ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: ENSTASIMOV/exercise-toolkit-fr | |
| path: exercise-toolkit-fr | |
| ref: main | |
| - name: Retrouver le dernier commentaire | |
| id: find-last-comment | |
| uses: peter-evans/find-comment@v3 | |
| with: | |
| repository: ${{ env.ISSUE_REPOSITORY }} | |
| issue-number: ${{ env.ISSUE_NUMBER }} | |
| direction: last | |
| - name: Indiquer la vérification | |
| uses: GrantBirki/comment@v2.1.1 | |
| with: | |
| repository: ${{ env.ISSUE_REPOSITORY }} | |
| issue-number: ${{ env.ISSUE_NUMBER }} | |
| comment-id: ${{ steps.find-last-comment.outputs.comment-id }} | |
| file: exercise-toolkit-fr/markdown-templates/step-feedback/checking-work.md | |
| edit-mode: replace | |
| - name: Vérifier le fichier | |
| id: check-file-exists | |
| continue-on-error: true | |
| uses: skills/exercise-toolkit/actions/file-exists@v0.7.1 | |
| with: | |
| file: playground/README.md | |
| - name: Vérifier Hello | |
| id: check-for-keyphrase | |
| continue-on-error: true | |
| uses: skills/action-keyphrase-checker@v1 | |
| with: | |
| text-file: playground/README.md | |
| keyphrase: Hello | |
| case-sensitive: false | |
| - name: Publier les résultats | |
| uses: GrantBirki/comment@v2.1.1 | |
| with: | |
| repository: ${{ env.ISSUE_REPOSITORY }} | |
| issue-number: ${{ env.ISSUE_NUMBER }} | |
| comment-id: ${{ steps.find-last-comment.outputs.comment-id }} | |
| edit-mode: replace | |
| file: exercise-toolkit-fr/markdown-templates/step-feedback/step-results-table.md | |
| vars: | | |
| step_number: 2 | |
| results_table: | |
| - description: "Le fichier playground/README.md existe" | |
| passed: ${{ steps.check-file-exists.outcome == 'success' }} | |
| - description: "Le fichier contient le mot Hello" | |
| passed: ${{ steps.check-for-keyphrase.outcome == 'success' }} | |
| - name: Échouer si nécessaire | |
| if: contains(steps.*.outcome, 'failure') | |
| run: exit 1 | |
| post_next_step_content: | |
| name: Afficher l'étape 3 | |
| needs: [find_exercise, check_step_work] | |
| runs-on: ubuntu-latest | |
| env: | |
| ISSUE_REPOSITORY: ${{ github.repository }} | |
| ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: ENSTASIMOV/exercise-toolkit-fr | |
| path: exercise-toolkit-fr | |
| ref: main | |
| - name: Confirmer l'étape | |
| uses: GrantBirki/comment@v2.1.1 | |
| with: | |
| repository: ${{ env.ISSUE_REPOSITORY }} | |
| issue-number: ${{ env.ISSUE_NUMBER }} | |
| file: exercise-toolkit-fr/markdown-templates/step-feedback/step-finished-prepare-next-step.md | |
| vars: | | |
| next_step_number: 3 | |
| - name: Publier l'étape 3 | |
| uses: GrantBirki/comment@v2.1.1 | |
| with: | |
| repository: ${{ env.ISSUE_REPOSITORY }} | |
| issue-number: ${{ env.ISSUE_NUMBER }} | |
| file: ${{ env.STEP_3_FILE }} | |
| - name: Publier le suivi | |
| uses: GrantBirki/comment@v2.1.1 | |
| with: | |
| repository: ${{ env.ISSUE_REPOSITORY }} | |
| issue-number: ${{ env.ISSUE_NUMBER }} | |
| file: exercise-toolkit-fr/markdown-templates/step-feedback/watching-for-progress.md |