Skip to content

Commit

Permalink
Changes from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
ernest-deriv committed Jul 17, 2024
2 parents 15cc37c + de3435a commit b959c5e
Show file tree
Hide file tree
Showing 508 changed files with 25,404 additions and 765 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/all_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
- name: Set SSH Key
uses: webfactory/ssh-agent@fd34b8dee206fe74b288a5e61bc95fba2f1911eb
with:
ssh-private-key: ${{secrets.SSH_PRIVATE_KEY}}
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY }}
${{ secrets.SSH_CHART_PRIVATE_KEY }}
- name: Install Melos and run pub get
uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/check_versioning_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: versioning_pr_exists

on:
pull_request:
types: [opened, edited, reopened, synchronize]

jobs:
check-version-pr:
runs-on: ubuntu-latest
if: ${{ ! startsWith(github.event.pull_request.title , 'chore(version)') }}
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Set up Node.js
uses: actions/setup-node@eff380dfbcf941bf8832e4acb788cebe13dfd758
with:
node-version: "14"

- name: Check if PR with title chore(version) exists
id: check-pr
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
github-token: ${{ secrets.PAT }}
script: |
const { data: pullRequests } = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
per_page: 100
});
const existingPR = pullRequests.find(pr => pr.title === 'chore(version): bump version and update changelog');
if (existingPR) {
core.setOutput("VERSIONING_PR_EXISTS", true);
console.log("Version bump pull request exists. Please merge that pr first to pass the check.: #${existingPR.number}");
} else {
core.setOutput("VERSIONING_PR_EXISTS", false);
console.log("No version bump pull request found.");
}
- name: Delete comment if exists
uses: izhangzhihao/delete-comment@d075704468e1cf74e60944d9f335351213c34d85
with:
github_token: ${{ secrets.PAT }}
delete_user_name: mobile-apps-deriv
issue_number: ${{ github.event.number }}

- name: Comment if versioning PR exists
if: ${{ contains(steps.check-pr.outputs.VERSIONING_PR_EXISTS, 'true') }}
uses: marocchino/sticky-pull-request-comment@4b7290acd5c5b99ef9995db30e52150e705d2475
with:
GITHUB_TOKEN: ${{ secrets.PAT }}
message: |
**Merge Is BLOCKED : we still have a chore(version) pr open, please merge that pr first **
- name: Fail if versioning PR exists
if: ${{ contains(steps.check-pr.outputs.VERSIONING_PR_EXISTS, 'true') }}
run: |
echo "A PR with the title 'chore(version)' already exists. Exiting."
exit 1
4 changes: 2 additions & 2 deletions .github/workflows/localization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
channel: "stable"
flutter-version: "3.10.2"
cache: true

- name: Setup Config
run: |
git config --global user.name 'mobile-apps-deriv'
Expand All @@ -38,11 +38,11 @@ jobs:
./l10n.sh
env:
GITHUB_TOKEN: ${{ secrets.PAT }}


- name: Create Pull Request.
uses: peter-evans/create-pull-request@76c6f5c20e2111bfee3cd30fae52a25e410f5efc
with:
token: ${{ secrets.PAT }}
title: "refactor(deriv_localizations): Crowdin Localization Generated"
branch: create-pull-request/localisation
base: master
14 changes: 7 additions & 7 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ jobs:
run: bash readme.sh
working-directory: ./scripts

- name: Create Pull Request on updated changelog and pubspec file.
uses: peter-evans/create-pull-request@76c6f5c20e2111bfee3cd30fae52a25e410f5efc
with:
token: ${{ secrets.PAT }}
title: "chore(version): bump version and update changelog"
base: master

- name: Send Slack Notification
uses: ./.github/actions/send_slack_notifications
if: ${{ contains(steps.push-tag.outputs.PUSH_OUTPUT, 'Packages updated') }}
with:
SLACK_WEBHOOK_PACKAGE_UPDATE: ${{ secrets.SLACK_WEBHOOK_PACKAGE_UPDATE }}
PR_TITLE: ${{ github.event.pull_request.title }}
TAGS: ${{ steps.new-tags.outputs.NEW_TAGS }}

- name: Create Pull Request on updated changelog and pubspec file.
uses: peter-evans/create-pull-request@76c6f5c20e2111bfee3cd30fae52a25e410f5efc
with:
token: ${{ secrets.PAT }}
title: "chore(version): bump version and update changelog"
base: master
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ lib/basic_api/generated/*.json
*.iws
.idea/

.fvm

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
Expand Down
Loading

0 comments on commit b959c5e

Please sign in to comment.