From 4043e8e2e5f2568e415876d9a7474afd797c6b9a Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Thu, 11 Jan 2024 11:05:33 -0800 Subject: [PATCH] Update GitHub Actions (#45) --- .github/pull_request_template.md | 37 ++++++-------------- .github/pull_request_template.md.license | 5 +++ .github/workflows/xcodebuild-or-fastlane.yml | 24 +++++++++---- 3 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 .github/pull_request_template.md.license diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a32e284..b067300 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,40 +1,25 @@ - - # *Name of the PR* ## :recycle: Current situation & Problem -*Describe the current situation (if possible, with an exemplary (or real) code snippet and/or where this is used)* -*Please link any open issue that is addressed with this PR* +*Link any open issues or pull requests (PRs) related to this PR. Please ensure that all non-trivial PRs are first tracked and discussed in an existing GitHub issue or discussion.* -## :bulb: Proposed solution -*Describe the solution and how this affects the project and internal structure* ## :gear: Release Notes -*Add a summary of the feature and possible migration guides if this is a breaking change so this section can be added to the release notes.* -*Include code snippets that provide examples of the feature implemented if it appends or changes the public interface.* +*Add a bullet point list summary of the feature and possible migration guides if this is a breaking change so this section can be added to the release notes.* +*Include code snippets that provide examples of the feature implemented or links to the documentation if it appends or changes the public interface.* + -## :heavy_plus_sign: Additional Information -*Provide some additional information if possible* +## :books: Documentation +*Please ensure that you properly document any additions in conformance to [Spezi Documentation Guide](https://github.com/StanfordSpezi/.github/blob/main/DOCUMENTATIONGUIDE.md).* +*You can use this section to describe your solution, but we encourage contributors to document your reasoning and changes using in-line documentation.* -### Related PRs -*Reference the related PRs* -### Testing -*Are there tests included? If yes, which situations are tested, and which corner cases are missing?* +## :white_check_mark: Testing +*Please ensure that the PR meets the testing requirements set by CodeCov and that new functionality is appropriately tested.* +*This section describes important information about the tests and why some elements might not be testable.* -### Reviewer Nudging -*Where should the reviewer start? Where is a good entry point?* -### Code of Conduct & Contributing Guidelines +## :pencil: Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md): - [ ] I agree to follow the [Code of Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md). - diff --git a/.github/pull_request_template.md.license b/.github/pull_request_template.md.license new file mode 100644 index 0000000..e6bb555 --- /dev/null +++ b/.github/pull_request_template.md.license @@ -0,0 +1,5 @@ +This source file is part of the Stanford CS342 - Building for Digital Health class + +SPDX-FileCopyrightText: 2022 Stanford University + +SPDX-License-Identifier: MIT \ No newline at end of file diff --git a/.github/workflows/xcodebuild-or-fastlane.yml b/.github/workflows/xcodebuild-or-fastlane.yml index 0620bed..339b568 100644 --- a/.github/workflows/xcodebuild-or-fastlane.yml +++ b/.github/workflows/xcodebuild-or-fastlane.yml @@ -1,8 +1,7 @@ # -# This source file is part of the Stanford CS342 - Building for Digital Health class -# It is a copy of the xcodebuild-or-fastlane.yml GitHub Action workflow as copied from the Stanford Biodesign Digital Health organization. +# This source file is part of the Stanford Biodesign Digital Health Group open-source organization # -# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) +# SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md) # # SPDX-License-Identifier: MIT # @@ -77,6 +76,11 @@ on: required: false type: boolean default: false + googleserviceinfoplistpath: + description: 'Path to the GoogleService-Info.plist file that is replaced using the content found in the secret GOOGLE_SERVICE_INFO_PLIST' + required: false + type: string + default: '' codeql: description: 'Use CodeQL code scanning' required: false @@ -114,8 +118,11 @@ on: APPLE_ID: description: 'The Apple ID you use to access the App Store Connect API.' required: false - checkout_token: - description: "The Personal access token (PAT) to use with the checkout action" + CHECKOUT_TOKEN: + description: 'The Personal access token (PAT) to use with the checkout action' + required: false + GOOGLE_SERVICE_INFO_PLIST_BASE64: + description: 'The Base64 version of the GoogleService-Info.plist file that is used to replace the file found at googleserviceinfoplistpath if the arguemnt is set.' required: false jobs: @@ -129,9 +136,8 @@ jobs: - uses: actions/checkout@v4 with: # This is GitHubs way of implementing ternary expressions (see https://docs.github.com/en/actions/learn-github-actions/expressions) - token: ${{ secrets.checkout_token != '' && secrets.checkout_token || github.token }} + token: ${{ secrets.CHECKOUT_TOKEN != '' && secrets.CHECKOUT_TOKEN || github.token }} submodules: ${{ inputs.checkout_submodules }} - - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: ${{ inputs.xcodeversion }} @@ -208,6 +214,10 @@ jobs: SECONDARY_UUID=`grep UUID -A1 -a $PP_SECONDARY_PATH | grep -io "[-A-F0-9]\{36\}"` cp $PP_SECONDARY_PATH ~/Library/MobileDevice/Provisioning\ Profiles/$SECONDARY_UUID.mobileprovision fi + - name: Setup Google Services File + if: ${{ inputs.googleserviceinfoplistpath != '' }} + run: | + echo -n "${{ secrets.GOOGLE_SERVICE_INFO_PLIST_BASE64 }}" | base64 --decode -o "${{ inputs.googleserviceinfoplistpath }}" - name: Initialize CodeQL if: ${{ !env.selfhosted && inputs.codeql }} uses: github/codeql-action/init@v2