diff --git a/.github/workflows/fix-vulnerabilities.yml b/.github/workflows/fix-vulnerabilities.yml new file mode 100644 index 000000000..d831268db --- /dev/null +++ b/.github/workflows/fix-vulnerabilities.yml @@ -0,0 +1,39 @@ +name: Fix vulnerabilities +on: + schedule: + # Run at 4:00 every Monday + - cron: 0 4 * * 1 + workflow_dispatch: + inputs: + dry-run: + description: Print the pull request instead of creating it + type: boolean + default: true +concurrency: + # Prevent concurrent runs from pushing to the same branch + group: ${{ github.workflow }} + cancel-in-progress: false +jobs: + fix: + name: "Fix vulnerabilities" + if: ${{ github.repository == 'microsoft/react-native-test-app' }} + permissions: + contents: write + copilot-requests: write + pull-requests: write + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + filter: blob:none + persist-credentials: false + - name: Fix vulnerabilities + uses: microsoft/rnx-kit/.github/actions/fix-vulnerabilities@53a160bcc194fcbe49511b9f0912522e740685ae + with: + projects: "." + # Scheduled runs have no inputs + dry-run: ${{ inputs.dry-run == true }} + app-client-id: ${{ vars.APP_ID }} + app-private-key: ${{ secrets.PRIVATE_KEY }} + timeout-minutes: 30