mirror of
https://github.com/bitwarden/android.git
synced 2024-12-26 19:08:32 +03:00
PM-3349 PM-3350 build.yml uncommented jobs so we have a more complete workflow
This commit is contained in:
parent
406f4425c8
commit
7ea86380f4
1 changed files with 98 additions and 99 deletions
197
.github/workflows/build.yml
vendored
197
.github/workflows/build.yml
vendored
|
@ -16,21 +16,20 @@ env:
|
|||
target-net-version: net8.0
|
||||
|
||||
jobs:
|
||||
# cloc:
|
||||
# name: CLOC
|
||||
# runs-on: ubuntu-22.04
|
||||
# steps:
|
||||
# - name: Checkout repo
|
||||
# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
cloc:
|
||||
name: CLOC
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
# - name: Set up CLOC
|
||||
# run: |
|
||||
# sudo apt-get update
|
||||
# sudo apt-get -y install cloc
|
||||
|
||||
# - name: Print lines of code
|
||||
# run: cloc --vcs git --exclude-dir Resources,store,test,Properties --include-lang C#,XAML
|
||||
- name: Set up CLOC
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install cloc
|
||||
|
||||
- name: Print lines of code
|
||||
run: cloc --vcs git --exclude-dir Resources,store,test,Properties --include-lang C#,XAML
|
||||
|
||||
setup:
|
||||
name: Setup
|
||||
|
@ -785,97 +784,97 @@ jobs:
|
|||
--username "$APPLE_ID_USERNAME" --password "$APPLE_ID_PASSWORD"
|
||||
|
||||
|
||||
# crowdin-push:
|
||||
# name: Crowdin Push
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# needs:
|
||||
# - android
|
||||
# - f-droid
|
||||
# - ios
|
||||
# runs-on: ubuntu-22.04
|
||||
# env:
|
||||
# _CROWDIN_PROJECT_ID: "269690"
|
||||
# steps:
|
||||
# - name: Checkout repo
|
||||
# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
crowdin-push:
|
||||
name: Crowdin Push
|
||||
if: github.ref == 'refs/heads/master'
|
||||
needs:
|
||||
- android
|
||||
- f-droid
|
||||
- ios
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
_CROWDIN_PROJECT_ID: "269690"
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
# - name: Login to Azure - CI Subscription
|
||||
# uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.6
|
||||
# with:
|
||||
# creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
||||
- name: Login to Azure - CI Subscription
|
||||
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.6
|
||||
with:
|
||||
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
||||
|
||||
# - name: Retrieve secrets
|
||||
# id: retrieve-secrets
|
||||
# uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
||||
# with:
|
||||
# keyvault: "bitwarden-ci"
|
||||
# secrets: "crowdin-api-token"
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "crowdin-api-token"
|
||||
|
||||
# - name: Upload Sources
|
||||
# uses: crowdin/github-action@965d501f160af7b1f88aed4c29154b0caf1e94b9 # v1.9.0
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
|
||||
# with:
|
||||
# config: crowdin.yml
|
||||
# crowdin_branch_name: master
|
||||
# upload_sources: true
|
||||
# upload_translations: false
|
||||
- name: Upload Sources
|
||||
uses: crowdin/github-action@965d501f160af7b1f88aed4c29154b0caf1e94b9 # v1.9.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
|
||||
with:
|
||||
config: crowdin.yml
|
||||
crowdin_branch_name: master
|
||||
upload_sources: true
|
||||
upload_translations: false
|
||||
|
||||
|
||||
# check-failures:
|
||||
# name: Check for failures
|
||||
# if: always()
|
||||
# runs-on: ubuntu-22.04
|
||||
# needs:
|
||||
# - cloc
|
||||
# - android
|
||||
# - f-droid
|
||||
# - ios
|
||||
# - crowdin-push
|
||||
# steps:
|
||||
# - name: Check if any job failed
|
||||
# if: |
|
||||
# (github.ref == 'refs/heads/master')
|
||||
# || (github.ref == 'refs/heads/rc')
|
||||
# || (github.ref == 'refs/heads/hotfix-rc')
|
||||
# env:
|
||||
# CLOC_STATUS: ${{ needs.cloc.result }}
|
||||
# ANDROID_STATUS: ${{ needs.android.result }}
|
||||
# F_DROID_STATUS: ${{ needs.f-droid.result }}
|
||||
# IOS_STATUS: ${{ needs.ios.result }}
|
||||
# CROWDIN_PUSH_STATUS: ${{ needs.crowdin-push.result }}
|
||||
# run: |
|
||||
# if [ "$CLOC_STATUS" = "failure" ]; then
|
||||
# exit 1
|
||||
# elif [ "$ANDROID_STATUS" = "failure" ]; then
|
||||
# exit 1
|
||||
# elif [ "$F_DROID_STATUS" = "failure" ]; then
|
||||
# exit 1
|
||||
# elif [ "$IOS_STATUS" = "failure" ]; then
|
||||
# exit 1
|
||||
# elif [ "$CROWDIN_PUSH_STATUS" = "failure" ]; then
|
||||
# exit 1
|
||||
# fi
|
||||
check-failures:
|
||||
name: Check for failures
|
||||
if: always()
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- cloc
|
||||
- android
|
||||
- f-droid
|
||||
- ios
|
||||
- crowdin-push
|
||||
steps:
|
||||
- name: Check if any job failed
|
||||
if: |
|
||||
(github.ref == 'refs/heads/master')
|
||||
|| (github.ref == 'refs/heads/rc')
|
||||
|| (github.ref == 'refs/heads/hotfix-rc')
|
||||
env:
|
||||
CLOC_STATUS: ${{ needs.cloc.result }}
|
||||
ANDROID_STATUS: ${{ needs.android.result }}
|
||||
F_DROID_STATUS: ${{ needs.f-droid.result }}
|
||||
IOS_STATUS: ${{ needs.ios.result }}
|
||||
CROWDIN_PUSH_STATUS: ${{ needs.crowdin-push.result }}
|
||||
run: |
|
||||
if [ "$CLOC_STATUS" = "failure" ]; then
|
||||
exit 1
|
||||
elif [ "$ANDROID_STATUS" = "failure" ]; then
|
||||
exit 1
|
||||
elif [ "$F_DROID_STATUS" = "failure" ]; then
|
||||
exit 1
|
||||
elif [ "$IOS_STATUS" = "failure" ]; then
|
||||
exit 1
|
||||
elif [ "$CROWDIN_PUSH_STATUS" = "failure" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# - name: Login to Azure - CI Subscription
|
||||
# uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.6
|
||||
# if: failure()
|
||||
# with:
|
||||
# creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
||||
- name: Login to Azure - CI Subscription
|
||||
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.6
|
||||
if: failure()
|
||||
with:
|
||||
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
||||
|
||||
# - name: Retrieve secrets
|
||||
# id: retrieve-secrets
|
||||
# uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
||||
# if: failure()
|
||||
# with:
|
||||
# keyvault: "bitwarden-ci"
|
||||
# secrets: "devops-alerts-slack-webhook-url"
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
||||
if: failure()
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "devops-alerts-slack-webhook-url"
|
||||
|
||||
# - name: Notify Slack on failure
|
||||
# uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0
|
||||
# if: failure()
|
||||
# env:
|
||||
# SLACK_WEBHOOK_URL: ${{ steps.retrieve-secrets.outputs.devops-alerts-slack-webhook-url }}
|
||||
# with:
|
||||
# status: ${{ job.status }}
|
||||
- name: Notify Slack on failure
|
||||
uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0
|
||||
if: failure()
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ steps.retrieve-secrets.outputs.devops-alerts-slack-webhook-url }}
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
|
|
Loading…
Reference in a new issue