fix: add special variable for scripts #6
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: "Certificates sync" | ||
on: | ||
workflow_call: | ||
inputs: | ||
DIRECTORY: | ||
type: string | ||
required: true | ||
description: 'Working directory' | ||
APP_TYPE: | ||
type: string | ||
required: true | ||
description: 'App type for which certificates should be synced' | ||
BUILD_TYPE: | ||
type: string | ||
required: true | ||
description: 'Build type for which certificates should be synced' | ||
BUILD_PROD_FRAMEWORK | ||
type: boolean | ||
required: false | ||
secrets: | ||
GCP_SERVICE_ACCOUNT: | ||
required: true | ||
MATCHFILE: | ||
required: true | ||
jobs: | ||
check-certificates: | ||
runs-on: [ macos-latest ] | ||
timeout-minutes: 20 | ||
steps: | ||
- id: checkout | ||
name: 'Checkout' | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ inputs.DIRECTORY }} | ||
clean: true | ||
- id: checkout-pipeline | ||
name: 'Checkout pipeline files' | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: intergiro/github | ||
path: ${{ inputs.DIRECTORY }} | ||
ref: add_ios_pipelines | ||
sparse-checkout: | | ||
fastlane | ||
Scripts | ||
- id: create-gc-auth-json | ||
name: "Save fastlane files and gc auth data to fastlane folder" | ||
working-directory: ${{ inputs.DIRECTORY }} | ||
shell: bash | ||
run: | | ||
touch fastlane/Matchfile && ruby fastlane/create-gc-auth-json.rb '${{ secrets.GCP_SERVICE_ACCOUNT }}' && echo "${{ secrets.MATCHFILE }}" | tr : '\n' >> fastlane/Matchfile | ||
- id: sync_prod_app_ceritficates | ||
name: 'Sync certificates for prod App' | ||
shell: bash | ||
if: inputs.APP_TYPE == 'prod' | ||
working-directory: ${{ inputs.DIRECTORY }} | ||
run: | | ||
echo "Sync certificates for prod App" | ||
ls -l fastlane | ||
fastlane sync_certificates build_type:${{ inputs.BUILD_TYPE }} identifiers:"com.intergiro.app,com.intergiro.app.notificationService" | ||
- id: sync_dev_app_ceritficates | ||
name: 'Sync certificates for dev App' | ||
shell: bash | ||
if: inputs.APP_TYPE == 'dev' | ||
working-directory: ${{ inputs.DIRECTORY }} | ||
run: | | ||
echo "Sync certificates for dev App" | ||
fastlane sync_certificates build_type:${{ inputs.BUILD_TYPE }} identifiers:"com.intergiro.app-dev,com.intergiro.app-dev.notificationService" | ||
- id: build_prod_framework | ||
name: 'Build prod framework' | ||
shell: bash | ||
if: inputs.BUILD_PROD_FRAMEWORK == 'true' | ||
run: | | ||
./Scripts/build-prod-framework.sh |