Initial commit #1
This file contains 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: Template Cleanup | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
template-cleanup: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
issues: write | |
timeout-minutes: 10 | |
if: github.event.repository.name != 'flutter-training-template' | |
steps: | |
# https://github.com/actions/checkout | |
- name: Fetch sources | |
uses: actions/checkout@v4 | |
- name: Create issues from sessions | |
uses: ./.github/actions/create-issues-from-sessions | |
# TODO: After adding a challenge, uncomment. | |
# - name: Create issues from challenges | |
# uses: ./.github/actions/create-issues-from-challenges | |
# https://github.com/dart-lang/setup-dart | |
- name: Set up dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: "3.3.0" # See: tools/cleanup_template/pubspec.yaml | |
- name: Install dependencies | |
run: dart pub get | |
shell: bash | |
working-directory: tools/cleanup_template | |
- name: Run cleanup_template | |
run: dart run bin/cleanup_template.dart | |
shell: bash | |
working-directory: tools/cleanup_template | |
- name: Commit files | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Template cleanup" | |
# https://github.com/ad-m/github-push-action | |
- name: Push changes | |
uses: ad-m/github-push-action@v0.8.0 | |
with: | |
branch: main | |
github_token: ${{ secrets.GITHUB_TOKEN }} |