Skip to content

Commit

Permalink
Test moving CI Info update to the first job
Browse files Browse the repository at this point in the history
  • Loading branch information
vvolkgang committed Feb 3, 2025
1 parent 5f52c49 commit d47d1c1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ jobs:
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Update app CI Build info
run: |
./scripts/update_app_ci_build_info.sh \
$GITHUB_REPOSITORY \
$GITHUB_REF_NAME \
$GITHUB_SHA \
$GITHUB_RUN_ID \
$GITHUB_RUN_ATTEMPT
- name: Check
run: bundle exec fastlane check

Expand Down Expand Up @@ -184,15 +193,6 @@ jobs:
distribution: "temurin"
java-version: ${{ env.JAVA_VERSION }}

- name: Update app CI Build info
run: |
./scripts/update_app_ci_build_info.sh \
$GITHUB_REPOSITORY \
$GITHUB_REF_NAME \
$GITHUB_SHA \
$GITHUB_RUN_ID \
$GITHUB_RUN_ATTEMPT
- name: Increment version
run: |
DEFAULT_VERSION_CODE=$((11000+$GITHUB_RUN_NUMBER))
Expand Down Expand Up @@ -469,15 +469,6 @@ jobs:
distribution: "temurin"
java-version: ${{ env.JAVA_VERSION }}

- name: Update app CI Build info
run: |
./scripts/update_app_ci_build_info.sh \
$GITHUB_REPOSITORY \
$GITHUB_REF_NAME \
$GITHUB_SHA \
$GITHUB_RUN_ID \
$GITHUB_RUN_ATTEMPT
# Start from 11000 to prevent collisions with mobile build version codes
- name: Increment version
run: |
Expand Down
4 changes: 2 additions & 2 deletions scripts/update_app_ci_build_info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

if [ $# -ne 5 ]; then
echo "Usage: $0 <repository> <branch> <commit_hash> <ci_run_number> <ci_run_attempt>"
echo "E.g: $0 bitwarden/android main abc123 123 1"
echo "E.g: ./scripts/$0 bitwarden/android main abc123 123 1"
exit 1
fi

Expand All @@ -20,7 +20,7 @@ commit_hash=$3
ci_run_number=$4
ci_run_attempt=$5

ci_build_info_file="../ci.properties"
ci_build_info_file="ci.properties"
git_source="${repository}/${branch}@${commit_hash}"
ci_run_source="${repository}/actions/runs/${ci_run_number}/attempts/${ci_run_attempt}"
emoji_brick="\\ud83e\\uddf1" # 🧱
Expand Down

0 comments on commit d47d1c1

Please sign in to comment.