Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:wireapp/wire-webapp into chore/wpb-4538
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisamir98 committed Jan 30, 2024
2 parents e6cf535 + 061da8d commit fffc1e5
Show file tree
Hide file tree
Showing 135 changed files with 2,867 additions and 1,271 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/cherry-pick-release-to-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,23 @@ on:
push:
branches:
- release/*

permissions:
pull-requests: write
contents: write

jobs:
cherry_pick:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Create PR to branch
uses: gorillio/github-action-cherry-pick@master
with:
pr_branch: 'dev'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}}
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
pull_request:
# we want to run the CI on every PR targetting those branches
branches: [master, dev]
branches: [master, dev, release/*]

push:
# We also run CI on dev in order to update the coverage monitoring
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
run: yarn test --coverage --coverage-reporters=lcov --detectOpenHandles=false

- name: Monitor coverage
uses: codecov/[email protected].4
uses: codecov/[email protected].5
with:
fail_ci_if_error: false
files: ./coverage/lcov.info
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/dependabot-auto-merge.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
uses: actions/dependency-review-action@v4
4 changes: 3 additions & 1 deletion .github/workflows/jira-lint-and-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
types: [opened, edited, synchronize]
jobs:
add-jira-description:
# avoid triggering this action on dependabot PRs
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- uses: cakeinpanic/[email protected]
Expand All @@ -12,5 +14,5 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
jira-token: ${{ secrets.JIRA_TOKEN }}
jira-base-url: https://wearezeta.atlassian.net
skip-branches: '^(production-release|main|master|release\/v\d+)$' #optional
skip-branches: '^(dev|master|release\/*)$'
fail-when-jira-issue-not-found: false
22 changes: 22 additions & 0 deletions .github/workflows/pr-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: auto-merge PR
on: pull_request

permissions:
pull-requests: write
contents: write

# This job will enable auto merge on dependabots and otto-the-bot's PRs
jobs:
activate-auto-merge:
runs-on: ubuntu-latest
if: ${{github.actor == 'dependabot[bot]' || github.actor == 'otto-the-bot'}}
steps:
- name: Approve PR
run: gh pr review --approve ${{github.event.pull_request.html_url}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Enable auto-merge
run: gh pr merge --auto --squash ${{github.event.pull_request.html_url}}
env:
GITHUB_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}}
48 changes: 40 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish

on:
push:
branches: [master, dev]
branches: [master, dev, release/*]
tags:
- '*staging*'
- '*production*'
Expand Down Expand Up @@ -77,6 +77,10 @@ jobs:
wire_builds_target_branches='["dev"]'
fi
if [ "$version_tag" == "release/q1-2024" ]; then
wire_builds_target_branches='["q1-2024"]'
fi
echo "wire_builds_target_branches: $wire_builds_target_branches"
echo "wire_builds_target_branches=$wire_builds_target_branches" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -201,20 +205,48 @@ jobs:
- name: Create new build in wire-build
shell: bash
run: |
git fetch --depth 1 origin "${{ matrix.target_branch }}"
git checkout "${{ matrix.target_branch }}"
set -eo pipefail
chart_version="${{needs.build.outputs.chart_version}}"
build_json=$(cat ./build.json | ./bin/bump-chart webapp "$chart_version" | ./bin/bump-prerelease )
echo "$build_json" > ./build.json
image_tag="${{needs.build.outputs.image_tag}}"
git add build.json
git config --global user.email "[email protected]"
git config --global user.name "Zebot"
git commit -m "Bump webapp to $chart_version"
git push origin "${{ matrix.target_branch }}"
for retry in $(seq 3); do
(
set -e
if (( retry > 1 )); then
echo "Retrying..."
fi
git fetch --depth 1 origin "${{ matrix.target_branch }}"
git checkout "${{ matrix.target_branch }}"
git reset --hard @{upstream}
build_json=$(cat ./build.json | \
./bin/set-chart-fields webapp \
"version=$chart_version" \
"repo=https://s3-eu-west-1.amazonaws.com/public.wire.com/charts-webapp" \
"meta.appVersion=$image_tag" \
"meta.commitURL=${{github.event.head_commit.url}}" \
"meta.commit=${{github.event.head_commit.id}}" \
| ./bin/bump-prerelease )
echo "$build_json" > ./build.json
git add build.json
git commit -m "Bump webapp to $chart_version"
git push origin "${{ matrix.target_branch }}"
) && break
done
if (( $? != 0 )); then
echo "Retrying didn't help. Failing the step."
exit 1
fi
#FUTUREWORK: Remove this job once production builds are based on wireapp/wire-builds
update_helm_chart:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/pull_translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Pull translations from crowdin

on:
workflow_dispatch:

jobs:
sync_translations:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{github.token}}

- name: Yarn cache
uses: c-hive/gha-yarn-cache@v2

- name: Authenticate git clone
env:
GH_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}}
run: echo -e "machine github.com\n login ${GH_TOKEN}" > ~/.netrc

- name: Install JS dependencies
run: yarn --immutable

- name: Sync translations
uses: crowdin/[email protected]
env:
GITHUB_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}}
GITHUB_ACTOR: otto-the-bot
CROWDIN_PROJECT_ID: 342359
INPUT_DEBUG_MODE: true
with:
upload_sources: false
upload_translations: false
download_translations: true
push_translations: true
create_pull_request: true
localization_branch_name: 'pull_translations'
pull_request_title: 'chore: Pull translations'
commit_message: 'chore: Pull translations'
token: ${{secrets.WEBTEAM_CROWDIN_TOKEN}}
source: '/src/i18n/en-US.json'
translation: '/src/i18n/%locale%.json'
base_path: '.'
20 changes: 20 additions & 0 deletions .github/workflows/rename-cherry-pick-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: rename-auto-cherry-pick-pr
on: pull_request

permissions:
pull-requests: write

# This job will remove the AUTO: prefix from the PR title
jobs:
rename-auto-cherry-pick-pr:
runs-on: ubuntu-latest
if: startsWith(github.event.pull_request.title, 'AUTO:')
steps:
- name: Make title semantic
run: |
TITLE="${{github.event.pull_request.title}}"
SEMANTIC_TITLE="${TITLE/AUTO: /}"
echo "renaming pr to: $SEMANTIC_TITLE"
gh pr edit ${{github.event.pull_request.html_url}} --title "$SEMANTIC_TITLE"
env:
GH_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}}
2 changes: 1 addition & 1 deletion .github/workflows/sync_translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: yarn translate:merge

- name: Download translations
uses: crowdin/[email protected].0
uses: crowdin/[email protected].1
env:
GITHUB_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}}
CROWDIN_PROJECT_ID: 342359
Expand Down
2 changes: 1 addition & 1 deletion bin/push_docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ require('dotenv').config();
*/

/** Version tag of webapp (e.g. "2023-11-09-staging.0", "dev") */
const versionTag = process.argv[2];
const versionTag = process.argv[2].replace('/', '-');
const uniqueTagOut = process.argv[3] || '';
/** Commit ID of https://github.com/wireapp/wire-webapp (i.e. "1240cfda9e609470cf1154e18f5bc582ca8907ff") */
const commitSha = process.env.GITHUB_SHA || process.argv[4];
Expand Down
Loading

0 comments on commit fffc1e5

Please sign in to comment.