Update version to 1.0.30-1 on staging #1092
This file contains 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
name: Automerge PR | |
# This workflow is triggered by a pull request that is labeled | |
on: | |
pull_request: | |
types: | |
- labeled | |
status: {} | |
jobs: | |
getPullRequestMergeability: | |
if: github.actor == 'OSBotify' && github.event.label.name == 'automerge' | |
runs-on: ubuntu-latest | |
outputs: | |
isMergeable: ${{ steps.isPullRequestMergeable.outputs.IS_MERGEABLE }} | |
steps: | |
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f | |
with: | |
ref: main | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check if pull request is mergeable | |
id: isPullRequestMergeable | |
uses: Expensify/Expensify.cash/.github/actions/isPullRequestMergeable@main | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} | |
- name: Fail workflow if PR is not mergeable | |
if: ${{ steps.isPullRequestMergeable.outputs.IS_MERGEABLE == 'false' }} | |
run: exit 1 | |
# This Slack step is duplicated in all workflows, if you make a change to this step, make sure to update all | |
# the other workflows with the same change | |
- uses: 8398a7/action-slack@v3 | |
name: Job failed Slack notification | |
if: ${{ failure() }} | |
with: | |
status: custom | |
fields: workflow, repo | |
custom_payload: | | |
{ | |
channel: '#announce', | |
attachments: [{ | |
color: "#DB4545", | |
pretext: `<!here>`, | |
text: `💥 ${process.env.AS_REPO} failed on ${process.env.AS_WORKFLOW} workflow 💥`, | |
}] | |
} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
main: | |
runs-on: ubuntu-latest | |
needs: getPullRequestMergeability | |
if: github.event.pull_request.base.ref == 'main' && github.actor == 'OSBotify' && github.event.label.name == 'automerge' | |
steps: | |
- name: Export Files Changed | |
id: changed | |
# Version: 3.3.0 | |
uses: futuratrepadeira/changed-files@1d252c611c64289d35243fc37ece7323ea5e93e1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check for an auto approve | |
# Version: 2.0.0 | |
uses: hmarr/auto-approve-action@7782c7e2bdf62b4d79bdcded8332808fd2f179cd | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
if: steps.changed.outputs.files_updated == 'android/app/build.gradle ios/ExpensifyCash/Info.plist ios/ExpensifyCashTests/Info.plist package-lock.json package.json' && steps.changed.outputs.files_created == '' && steps.changed.outputs.files_deleted == '' | |
- name: Check for an auto merge | |
# Version: 0.12.0 | |
uses: pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07 | |
env: | |
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} | |
# This Slack step is duplicated in all workflows, if you make a change to this step, make sure to update all | |
# the other workflows with the same change | |
- uses: 8398a7/action-slack@v3 | |
name: Job failed Slack notification | |
if: ${{ failure() }} | |
with: | |
status: custom | |
fields: workflow, repo | |
custom_payload: | | |
{ | |
channel: '#announce', | |
attachments: [{ | |
color: "#DB4545", | |
pretext: `<!here>`, | |
text: `💥 ${process.env.AS_REPO} failed on ${process.env.AS_WORKFLOW} workflow 💥`, | |
}] | |
} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
staging: | |
runs-on: ubuntu-latest | |
needs: getPullRequestMergeability | |
if: github.event.pull_request.base.ref == 'staging' && github.actor == 'OSBotify' && github.event.label.name == 'automerge' | |
steps: | |
- name: Check for an auto approve | |
# Version: 2.0.0 | |
uses: hmarr/auto-approve-action@7782c7e2bdf62b4d79bdcded8332808fd2f179cd | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
if: github.event.pull_request.head.ref == 'main' | |
- name: Check for an auto merge | |
# Version: 0.12.0 | |
uses: pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07 | |
env: | |
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} | |
# This Slack step is duplicated in all workflows, if you make a change to this step, make sure to update all | |
# the other workflows with the same change | |
- uses: 8398a7/action-slack@v3 | |
name: Job failed Slack notification | |
if: ${{ failure() }} | |
with: | |
status: custom | |
fields: workflow, repo | |
custom_payload: | | |
{ | |
channel: '#announce', | |
attachments: [{ | |
color: "#DB4545", | |
pretext: `<!here>`, | |
text: `💥 ${process.env.AS_REPO} failed on ${process.env.AS_WORKFLOW} workflow 💥`, | |
}] | |
} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
production: | |
runs-on: ubuntu-latest | |
needs: getPullRequestMergeability | |
if: github.event.pull_request.base.ref == 'production' && github.actor == 'OSBotify' && github.event.label.name == 'automerge' | |
steps: | |
- name: Check for an auto approve | |
# Version: 2.0.0 | |
uses: hmarr/auto-approve-action@7782c7e2bdf62b4d79bdcded8332808fd2f179cd | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
if: github.event.pull_request.head.ref == 'staging' | |
- name: Check for an auto merge | |
# Version: 0.12.0 | |
uses: pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07 | |
env: | |
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} | |
# This Slack step is duplicated in all workflows, if you make a change to this step, make sure to update all | |
# the other workflows with the same change | |
- uses: 8398a7/action-slack@v3 | |
name: Job failed Slack notification | |
if: ${{ failure() }} | |
with: | |
status: custom | |
fields: workflow, repo | |
custom_payload: | | |
{ | |
channel: '#announce', | |
attachments: [{ | |
color: "#DB4545", | |
pretext: `<!here>`, | |
text: `💥 ${process.env.AS_REPO} failed on ${process.env.AS_WORKFLOW} workflow 💥`, | |
}] | |
} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} |