Fleet Merge #211
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
| # Generated by @google/jules-fleet init | |
| # https://github.com/google-labs-code/jules-sdk | |
| name: Fleet Merge | |
| on: | |
| schedule: | |
| - cron: '0 */3 * * *' | |
| workflow_dispatch: | |
| inputs: | |
| mode: | |
| description: 'PR selection mode' | |
| type: choice | |
| options: | |
| - label | |
| - fleet-run | |
| default: 'label' | |
| fleet_run_id: | |
| description: 'Fleet run ID (required for fleet-run mode)' | |
| type: string | |
| default: '' | |
| redispatch: | |
| description: 'Enable smart conflict resolution' | |
| type: boolean | |
| default: true | |
| concurrency: | |
| group: fleet-merge | |
| cancel-in-progress: true | |
| jobs: | |
| merge: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Decode private key | |
| id: decode-key | |
| run: | | |
| printf '%s' "${{ secrets.FLEET_APP_PRIVATE_KEY }}" | base64 -d > /tmp/fleet-app-key.pem | |
| { | |
| echo "pem<<PEMEOF" | |
| cat /tmp/fleet-app-key.pem | |
| echo "PEMEOF" | |
| } >> "$GITHUB_OUTPUT" | |
| rm /tmp/fleet-app-key.pem | |
| - name: Generate Fleet App token | |
| id: app-token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ secrets.FLEET_APP_ID }} | |
| private-key: ${{ steps.decode-key.outputs.pem }} | |
| - run: | | |
| REDISPATCH_FLAG="--redispatch" | |
| if [ "${{ inputs.redispatch }}" = "false" ]; then | |
| REDISPATCH_FLAG="" | |
| fi | |
| npx -y --package=@google/jules-fleet jules-fleet merge --mode ${{ inputs.mode || 'label' }} --run-id "${{ inputs.fleet_run_id }}" $REDISPATCH_FLAG | |
| env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| JULES_API_KEY: ${{ secrets.JULES_API_KEY }} | |
| FLEET_APP_ID: ${{ secrets.FLEET_APP_ID }} | |
| FLEET_APP_PRIVATE_KEY: ${{ secrets.FLEET_APP_PRIVATE_KEY }} | |
| FLEET_APP_INSTALLATION_ID: ${{ secrets.FLEET_APP_INSTALLATION_ID }} |