Skip to content

Commit

Permalink
Update Action Setup & Exclude Executing CodeQL on Self-Hosted Runners (
Browse files Browse the repository at this point in the history
…#25)

Signed-off-by: Paul Schmiedmayer <PSchmiedmayer@users.noreply.github.com>
  • Loading branch information
PSchmiedmayer authored Aug 4, 2023
1 parent c8f3363 commit f75b27c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/xcodebuild-or-fastlane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,33 +125,33 @@ jobs:
swift --version
echo "env.selfhosted: ${{ env.selfhosted }}"
- name: Install xcpretty
if: "!env.selfhosted && inputs.scheme != ''"
if: ${{ !env.selfhosted && inputs.scheme != '' }}
run: gem install xcpretty
- name: Cache .derivedData folder
if: "inputs.cacheDerivedData"
if: ${{ inputs.cacheDerivedData }}
uses: actions/cache@v3
with:
path: .derivedData
key: ${{ runner.os }}-${{ runner.arch }}-derivedData-${{ hashFiles('**/Package.swift', '**/*.pbxproj') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-derivedData-
- name: Cache Firebase Emulators
if: "!env.selfhosted && inputs.setupfirebaseemulator"
if: ${{ !env.selfhosted && inputs.setupfirebaseemulator }}
uses: actions/cache@v3
with:
path: ~/.cache/firebase/emulators
key: ${{ runner.os }}-${{ runner.arch }}-firebase-emulators-${{ hashFiles('~/.cache/firebase/emulators/**') }}
- name: Setup NodeJS
if: "!env.selfhosted && inputs.setupfirebaseemulator"
if: ${{ !env.selfhosted && inputs.setupfirebaseemulator }}
uses: actions/setup-node@v3
- name: Setup Java
if: "!env.selfhosted && inputs.setupfirebaseemulator"
if: ${{ !env.selfhosted && inputs.setupfirebaseemulator }}
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '17'
- name: Install Firebase CLI Tools
if: "!env.selfhosted && inputs.setupfirebaseemulator"
if: ${{ !env.selfhosted && inputs.setupfirebaseemulator }}
run: npm install -g firebase-tools
- name: Install the Apple certificate and provisioning profile
if: ${{ inputs.setupsigning }}
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Initialize CodeQL
if: ${{ inputs.codeql }}
if: ${{ !env.selfhosted && inputs.codeql }}
uses: github/codeql-action/init@v2
with:
languages: swift
Expand Down Expand Up @@ -238,7 +238,7 @@ jobs:
APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
APPLE_ID: ${{ secrets.APPLE_ID }}
- name: Perform CodeQL Analysis
if: ${{ inputs.codeql }}
if: ${{ !env.selfhosted && inputs.codeql }}
uses: github/codeql-action/analyze@v2
- name: Upload artifact
if: ${{ (success() || failure()) && inputs.artifactname != '' }}
Expand All @@ -247,7 +247,7 @@ jobs:
name: ${{ inputs.artifactname }}
path: ${{ inputs.path }}/${{ inputs.artifactname }}
- name: Clean up keychain and provisioning profile
if: "(inputs.setupsigning && env.selfhosted) || failure()"
if: ${{ (inputs.setupsigning && env.selfhosted) || failure() }}
run: |
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db || true
rm -rf ~/Library/MobileDevice/Provisioning\ Profiles || true

0 comments on commit f75b27c

Please sign in to comment.