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 1, 2024
1 parent 1d0fe4c commit 6beced0
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 39 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
32 changes: 17 additions & 15 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@v3
Expand Down Expand Up @@ -73,22 +73,23 @@ jobs:
--output /dev/null \
-d "{ \"data\": { \"assignee\": \"$assignee_id\" }}"
run_tests:
# 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 @@ -152,6 +153,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 }}
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,19 @@ jobs:
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 }}
# 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 }}
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,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 6beced0

Please sign in to comment.