Repository navigation
docs: valider le parcours GitHub Basics FR #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 3 | |
| on: | |
| pull_request: | |
| branches: | |
| - ci-test | |
| types: [opened, synchronize, reopened, edited] | |
| permissions: | |
| contents: read | |
| issues: write | |
| pull-requests: read | |
| env: | |
| STEP_4_FILE: ".github/steps/4-step.md" | |
| jobs: | |
| find_exercise: | |
| if: ${{ github.head_ref == 'ci-my-first-branch' }} | |
| 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 la pull request | |
| 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 la description | |
| id: check-pr-description | |
| continue-on-error: true | |
| shell: bash | |
| env: | |
| PR_BODY: ${{ github.event.pull_request.body }} | |
| run: | | |
| if [ -n "$PR_BODY" ]; then | |
| echo "message=La pull request contient une description" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "message=La pull request doit contenir une courte description" >> "$GITHUB_OUTPUT" | |
| exit 1 | |
| fi | |
| - 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: 3 | |
| results_table: | |
| - description: "${{ steps.check-pr-description.outputs.message }}" | |
| passed: ${{ steps.check-pr-description.outcome == 'success' }} | |
| - name: Échouer si nécessaire | |
| if: contains(steps.*.outcome, 'failure') | |
| run: exit 1 | |
| post_next_step_content: | |
| name: Afficher l'étape 4 | |
| 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: 4 | |
| - name: Publier l'étape 4 | |
| uses: GrantBirki/comment@v2.1.1 | |
| with: | |
| repository: ${{ env.ISSUE_REPOSITORY }} | |
| issue-number: ${{ env.ISSUE_NUMBER }} | |
| file: ${{ env.STEP_4_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 |