WMSDK-411: Rename config JSON key #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Distribute PushOk | |
on: | |
pull_request: | |
types: [ closed ] | |
branches: | |
- develop | |
push: | |
branches: | |
- 'release/*' | |
- 'support/*' | |
jobs: | |
distribution: | |
if: github.event.pull_request.merged == true || (github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/support/'))) | |
runs-on: macos-15 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Get last 3 commit messages | |
run: | | |
commits=$(git log -3 --pretty=format:"%s") | |
echo "commits=$commits" >> $GITHUB_ENV | |
- name: Get Mindbox SDK Version | |
run: | | |
sdkVersion=$(grep 'static let sdkVersion' SDKVersionProvider/SDKVersionProvider.swift | awk -F '"' '{print $2}') | |
echo "sdkVersion=$sdkVersion" >> $GITHUB_ENV | |
- name: Print environment variables for debugging | |
run: | | |
echo "Debugging variables:" | |
echo "github.event_name: ${{ github.event_name }}" | |
echo "github.ref: ${{ github.ref }}" | |
echo "github.head_ref: ${{ github.head_ref }}" | |
echo "commits: ${{ env.commits }}" | |
echo "sdkVersion: ${{ env.sdkVersion }}" | |
- name: Trigger build workflow in ios-app repo | |
run: | | |
curl --location 'https://mindbox.gitlab.yandexcloud.net/api/v4/projects/1021/trigger/pipeline' \ | |
--form 'token="${{ secrets.GITLAB_TRIGGER_TOKEN }}"' \ | |
--form 'ref="develop"' \ | |
--form "variables[INPUT_BRANCH]=\"${{ github.ref_name }}\"" \ | |
--form "variables[INPUT_COMMITS]=\"${{ env.commits }}\"" \ | |
--form "variables[INPUT_SDK_VERSION]=\"${{ env.sdkVersion }}\"" | |