Repository navigation
docs: add my 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: Step 3 # Ouvrir une pull request | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - edited | |
| permissions: | |
| contents: read | |
| actions: write | |
| issues: write | |
| pull-requests: read | |
| env: | |
| STEP_4_FILE: ".github/steps/4-step.md" | |
| TOOLKIT_REPOSITORY: "ENSTASIMOV/exercise-toolkit-fr" | |
| TOOLKIT_REF: "main" | |
| jobs: | |
| find_exercise: | |
| if: | | |
| !github.event.repository.is_template && | |
| github.head_ref == 'my-first-branch' | |
| name: Retrouver l'Issue de l'exercice | |
| uses: ENSTASIMOV/exercise-toolkit-fr/.github/workflows/find-exercise-issue.yml@main | |
| 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: | |
| - name: Récupérer le dépôt | |
| uses: actions/checkout@v4 | |
| - name: Récupérer les templates français | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.TOOLKIT_REPOSITORY }} | |
| path: exercise-toolkit-fr | |
| ref: ${{ env.TOOLKIT_REF }} | |
| - 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 que le travail est en cours de 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 de la pull request | |
| 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: Arrêter si une vérification échoue | |
| 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: | |
| - name: Récupérer le dépôt | |
| uses: actions/checkout@v4 | |
| - name: Récupérer les templates français | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.TOOLKIT_REPOSITORY }} | |
| path: exercise-toolkit-fr | |
| ref: ${{ env.TOOLKIT_REF }} | |
| - name: Confirmer l'étape terminée | |
| 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: Indiquer que la progression est surveillée | |
| 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 | |
| - name: Passer au workflow suivant | |
| run: | | |
| gh workflow disable "${{ github.workflow }}" | |
| gh workflow enable "Step 4" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |