Skip to content

Commit

Permalink
Allow for running workflows with an arbitrary base branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoy committed Feb 14, 2024
1 parent d44fb86 commit 76e28b9
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 40 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/bump_internal_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ jobs:
git config --global user.email "[email protected]"
bundle exec fastlane update_embedded_files
run_tests:
# run_tests:

name: Run Tests
# name: Run Tests

needs: update_embedded_files
uses: ./.github/workflows/pr.yml
secrets:
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
# needs: update_embedded_files
# uses: ./.github/workflows/pr.yml
# secrets:
# ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}

increment_build_number:

name: Increment Build Number

needs: run_tests
needs: update_embedded_files
runs-on: macos-13-xlarge
timeout-minutes: 10

Expand Down
30 changes: 16 additions & 14 deletions .github/workflows/code_freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:

steps:

- name: Assert main branch
run: |
if [ "${{ github.ref_name }}" != "main" ]; then
echo "👎 Not the main branch"
exit 1
fi
# - name: Assert main branch
# run: |
# if [ "${{ github.ref_name }}" != "main" ]; then
# echo "👎 Not the main branch"
# exit 1
# fi

- name: Check out the code
uses: actions/checkout@v4
Expand Down Expand Up @@ -82,20 +82,21 @@ jobs:
run_tests:

name: Run Tests
# name: Run Tests

needs: create_release_branch
uses: ./.github/workflows/pr.yml
with:
branch: ${{ needs.create_release_branch.outputs.release_branch_name }}
secrets:
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
# needs: create_release_branch
# uses: ./.github/workflows/pr.yml
# with:
# branch: ${{ needs.create_release_branch.outputs.release_branch_name }}
# secrets:
# ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}

increment_build_number:

name: Increment Build Number

needs: [ create_release_branch, run_tests ]
# needs: [ create_release_branch, run_tests ]
needs: [ create_release_branch ]
runs-on: macos-13-xlarge
timeout-minutes: 10

Expand Down Expand Up @@ -161,6 +162,7 @@ jobs:
with:
asana-task-url: ${{ needs.create_release_branch.outputs.asana_task_url }}
branch: ${{ needs.create_release_branch.outputs.release_branch_name }}
base-branch: ${{ github.ref_name }}
secrets:
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
GHA_ELEVATED_PERMISSIONS_TOKEN: ${{ secrets.GHA_ELEVATED_PERMISSIONS_TOKEN }}
36 changes: 18 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,21 +104,21 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY_RELEASE_S3: ${{ secrets.AWS_SECRET_ACCESS_KEY_RELEASE_S3 }}

appstore-release:
name: Prepare AppStore Release
uses: ./.github/workflows/build_appstore.yml
with:
destination: appstore
asana-task-url: ${{ github.event.inputs.asana-task-url || inputs.asana-task-url }}
branch: ${{ inputs.branch }}
secrets:
SSH_PRIVATE_KEY_FASTLANE_MATCH: ${{ secrets.SSH_PRIVATE_KEY_FASTLANE_MATCH }}
APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }}
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
MM_HANDLES_BASE64: ${{ secrets.MM_HANDLES_BASE64 }}
MM_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# appstore-release:
# name: Prepare AppStore Release
# uses: ./.github/workflows/build_appstore.yml
# with:
# destination: appstore
# asana-task-url: ${{ github.event.inputs.asana-task-url || inputs.asana-task-url }}
# branch: ${{ inputs.branch }}
# secrets:
# SSH_PRIVATE_KEY_FASTLANE_MATCH: ${{ secrets.SSH_PRIVATE_KEY_FASTLANE_MATCH }}
# APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }}
# APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
# APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }}
# MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
# ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
# MM_HANDLES_BASE64: ${{ secrets.MM_HANDLES_BASE64 }}
# MM_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }}
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ platform :mac do
private_lane :macos_codefreeze_prechecks do
ensure_git_status_clean

ensure_git_branch(branch: DEFAULT_BRANCH)
# ensure_git_branch(branch: DEFAULT_BRANCH)
git_pull

git_submodule_update(recursive: true, init: true)
Expand Down

0 comments on commit 76e28b9

Please sign in to comment.