Skip to content

Enhance GitHub Actions Workflow: Add workflow_dispatch trigger and update permissions for contents, issues, and pull requests #11

Enhance GitHub Actions Workflow: Add workflow_dispatch trigger and update permissions for contents, issues, and pull requests

Enhance GitHub Actions Workflow: Add workflow_dispatch trigger and update permissions for contents, issues, and pull requests #11

Workflow file for this run

name: Flutter Test
on:
pull_request:
branches:
- master
workflow_dispatch:
permissions:
contents: write
issues: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Flutter Pub Get
run: flutter pub get
- name: Run Tests
run: flutter test
- name: Check Test Results
if: success()
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'All tests passed! 🎉'
})