Skip to content

fix(Flutter): Added required flags to sandbox command when using Flutter #4538

fix(Flutter): Added required flags to sandbox command when using Flutter

fix(Flutter): Added required flags to sandbox command when using Flutter #4538

name: Redirects Workflow
on:
pull_request:
branches: [main]
env:
ARTIFACT_NAME: 'redirectsArtifact'
PATHS_TO_CHECK: 'src/pages,src/fragments'
jobs:
checkIfRedirectsAreNeeded:
name: Check if redirects are needed
runs-on: ubuntu-latest
steps:
- name: Checkout repository to get the workflow scripts
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Get count of deleted files
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
id: set-deleted-files-count
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const { PATHS_TO_CHECK } = process.env;
const paths = PATHS_TO_CHECK.split(',');
const { getDeletedFilesFromPR } = require('./.github/workflows/scripts/utilities.js');
return await getDeletedFilesFromPR({github, context, paths});
- name: Create artifact containing the PR number and deleted file count
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
artifactName="${{ env.ARTIFACT_NAME }}.txt"
echo ${{ env.PR_NUMBER }} >> $artifactName
echo ${{ steps.set-deleted-files-count.outputs.result }} >> $artifactName
- name: Upload the redirects file to artifacts
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: ${{ env.ARTIFACT_NAME }}
path: '${{ env.ARTIFACT_NAME }}.txt'
retention-days: 1