Repository navigation
Ajouter l'import temporaire des captures GitHub Skills #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: Importer les images officielles GitHub Skills | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/workflows/import-official-images.yml" | |
| permissions: | |
| contents: write | |
| jobs: | |
| import: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Télécharger les captures actuelles | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p .github/images | |
| base="https://raw.githubusercontent.com/skills/introduction-to-github/main/.github/images" | |
| for file in \ | |
| add-profile-file.png \ | |
| branch-selection-comparison.png \ | |
| branch-selection-dropdown.png \ | |
| code-tab-highlight.png \ | |
| commit-message-dialog.png \ | |
| compare-pull-request-button.png \ | |
| create-branch-prompt.png \ | |
| create-new-file-option.png \ | |
| create-pull-request-form.png \ | |
| delete-branch-button.png \ | |
| example-profile-readme.png \ | |
| merge-pull-request-button.png | |
| do | |
| curl --fail --location --silent --show-error \ | |
| "$base/$file" \ | |
| --output ".github/images/$file" | |
| test "$(xxd -p -l 8 ".github/images/$file")" = "89504e470d0a1a0a" | |
| done | |
| - name: Committer les captures | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add .github/images/ | |
| git diff --cached --quiet && exit 0 | |
| git commit -m "Importer les captures actuelles de GitHub Skills" | |
| git push |