diff --git a/.github/workflows/authorChecklist.yml b/.github/workflows/authorChecklist.yml index 33916d7bd10d..6cd881d18c29 100644 --- a/.github/workflows/authorChecklist.yml +++ b/.github/workflows/authorChecklist.yml @@ -9,7 +9,7 @@ jobs: # then you also need to go into PHP and update the name of this job in the GH_JOB_NAME_CHECKLIST constant checklist: runs-on: ubuntu-latest - if: github.actor != 'OSBotify' + if: github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' steps: - name: authorChecklist.js uses: Expensify/App/.github/actions/javascript/authorChecklist@main diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 54ae1048b57b..4031d6c0c119 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest # This job only runs for pull request comments or pull request target events (not issue comments) # It does not run for pull requests created by OSBotify - if: ${{ github.event.issue.pull_request || (github.event_name == 'pull_request_target' && github.event.pull_request.user.login != 'OSBotify') }} + if: ${{ github.event.issue.pull_request || (github.event_name == 'pull_request_target' && github.event.pull_request.user.login != 'OSBotify' && github.event.pull_request.user.login != 'imgbot[bot]') }} steps: - name: CLA comment check uses: actions-ecosystem/action-regex-match@9c35fe9ac1840239939c59e5db8839422eed8a73 diff --git a/.github/workflows/imgbot.yml b/.github/workflows/imgbot.yml new file mode 100644 index 000000000000..00a18a80a3df --- /dev/null +++ b/.github/workflows/imgbot.yml @@ -0,0 +1,21 @@ +name: imgbot Image Optimization + +on: pull_request + +permissions: + pull-requests: write + +jobs: + approveAndMerge: + runs-on: ubuntu-latest + if: ${{ github.actor == 'imgbot[bot]' }} + steps: + - name: Approve imgbot PR + run: gh pr review --approve "${{ github.event.pull_request.html_url }}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Merge imgbot PR + run: gh pr merge --auto --merge "${{ github.event.pull_request.html_url }}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index d7d372aa7948..11753a383219 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -140,7 +140,7 @@ jobs: newContributorWelcomeMessage: runs-on: ubuntu-latest needs: isExpensifyEmployee - if: ${{ github.actor != 'OSBotify' && !fromJSON(needs.isExpensifyEmployee.outputs.IS_EXPENSIFY_EMPLOYEE) }} + if: ${{ github.actor != 'OSBotify' && !fromJSON(needs.isExpensifyEmployee.outputs.IS_EXPENSIFY_EMPLOYEE) && github.actor != 'imgbot[bot]' }} steps: # Version: 2.3.4 - name: Checkout diff --git a/.github/workflows/reviewerChecklist.yml b/.github/workflows/reviewerChecklist.yml index 413fc88ff403..e86e08375269 100644 --- a/.github/workflows/reviewerChecklist.yml +++ b/.github/workflows/reviewerChecklist.yml @@ -7,7 +7,7 @@ jobs: # then you also need to go into PHP and update the name of this job in the GH_JOB_NAME_CHECKLIST constant checklist: runs-on: ubuntu-latest - if: github.actor != 'OSBotify' + if: github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' steps: - name: reviewerChecklist.js uses: Expensify/App/.github/actions/javascript/reviewerChecklist@main diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 72bdd0468fd2..c37f3a766f7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ on: jobs: jest: - if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} + if: ${{ github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' || github.event_name == 'workflow_call' }} runs-on: ubuntu-latest env: CI: true @@ -39,7 +39,7 @@ jobs: run: npx jest --silent --shard=${{ fromJSON(matrix.chunk) }}/${{ strategy.job-total }} --max-workers ${{ steps.cpu-cores.outputs.count }} storybookTests: - if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} + if: ${{ github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' || github.event_name == 'workflow_call' }} runs-on: ubuntu-latest name: Storybook tests steps: @@ -51,7 +51,7 @@ jobs: run: npm run storybook -- --smoke-test --ci shellTests: - if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} + if: ${{ github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' || github.event_name == 'workflow_call' }} runs-on: ubuntu-latest name: Shell tests steps: diff --git a/.github/workflows/validateDocsRoutes.yml b/.github/workflows/validateDocsRoutes.yml index 717560e19f5f..14c08e087565 100644 --- a/.github/workflows/validateDocsRoutes.yml +++ b/.github/workflows/validateDocsRoutes.yml @@ -8,7 +8,7 @@ on: jobs: verify: - if: github.actor != 'OSBotify' + if: github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/validateGithubActions.yml b/.github/workflows/validateGithubActions.yml index bcda941e1b05..2d3216fefe75 100644 --- a/.github/workflows/validateGithubActions.yml +++ b/.github/workflows/validateGithubActions.yml @@ -9,7 +9,7 @@ on: jobs: verify: - if: github.actor != 'OSBotify' + if: github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/verifyPodfile.yml b/.github/workflows/verifyPodfile.yml index d8d931e476d1..d98780e3e829 100644 --- a/.github/workflows/verifyPodfile.yml +++ b/.github/workflows/verifyPodfile.yml @@ -11,7 +11,7 @@ on: jobs: verify: - if: github.actor != 'OSBotify' + if: github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' runs-on: macos-latest steps: - name: Checkout