├── actions ├── vapor │ └── swift-4-2 │ │ ├── entrypoint.sh │ │ └── Dockerfile └── jazzy-docs │ ├── entrypoint.sh │ ├── Dockerfile │ └── README.md ├── README.md ├── LICENSE └── .gitignore /actions/vapor/swift-4-2/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -l 2 | swift test -Xswiftc -DNOJSON -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### github-actions 2 | A collection of github actions 3 | 4 | #### Contents 5 | - [Jazzy docs](actions/jazzy-docs) -------------------------------------------------------------------------------- /actions/vapor/swift-4-2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM swift:4.2 2 | MAINTAINER Steffen D. Sommer (stso@nodes.dk) 3 | ADD entrypoint.sh /entrypoint.sh 4 | ENTRYPOINT ["/entrypoint.sh"] 5 | -------------------------------------------------------------------------------- /actions/jazzy-docs/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | [ -z "$INPUT_TARGET" ] && echo "You need to specify the target in your .yml file." && exit 1; 4 | [ -z "$INPUT_COMMIT_MSG" ] && echo "You need to specify the commit_msg in your .yml file." && exit 1; 5 | 6 | set -eu; 7 | 8 | git checkout master; 9 | git worktree add --track -B gh-pages docs; 10 | 11 | swift build && \ 12 | sourcekitten doc --spm-module "$INPUT_TARGET" > "$INPUT_TARGET.json" && \ 13 | jazzy --clean --sourcekitten-sourcefile "$INPUT_TARGET.json" --module "$INPUT_TARGET" --output tmp; 14 | 15 | cd docs; 16 | ls -A | grep -vw .git | xargs rm -rf; 17 | cp -R ../tmp/* .; 18 | 19 | git add .; 20 | git commit -m "$INPUT_COMMIT_MSG"; 21 | git push -f "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" gh-pages; -------------------------------------------------------------------------------- /actions/jazzy-docs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nodesvapor/vapor-ci:swift-5.0 2 | 3 | RUN apt-get update && apt-get install -y \ 4 | libsqlite3-dev ruby-dev && \ 5 | rm -r /var/lib/apt/lists/* 6 | 7 | ENV SOURCEKITTEN_REVISION="0.24.0" 8 | ENV JAZZY_VERSION="0.10.0" 9 | ENV GITHUB_REPOSITORY="nodes-vapor/submissions" 10 | ENV TARGET="Submissions" 11 | 12 | # Install SourceKitten 13 | RUN git clone --branch $SOURCEKITTEN_REVISION https://github.com/jpsim/SourceKitten.git && \ 14 | cd SourceKitten && \ 15 | swift build --configuration release --static-swift-stdlib && \ 16 | mv `swift build --configuration release --static-swift-stdlib --show-bin-path`/sourcekitten /usr/bin && \ 17 | cd .. && \ 18 | rm -rf SourceKitten && \ 19 | gem install bundler && \ 20 | gem install jazzy --version "$JAZZY_VERSION" 21 | 22 | ADD entrypoint.sh /entrypoint.sh 23 | ENTRYPOINT ["/entrypoint.sh"] 24 | -------------------------------------------------------------------------------- /actions/jazzy-docs/README.md: -------------------------------------------------------------------------------- 1 | ### Jazzy docs Github Action 2 | A github action for swift projects. Uses the Jazzy documentation framework to autogenerate docs in html 3 | 4 | #### Usage 5 | You have to create a .yml file in the `.github/workflows/` 6 | eg.: `.github/workflows/release.yml` 7 | 8 | ```yml 9 | on: release # the event that triggers the action, more information here 👉 https://help.github.com/en/articles/events-that-trigger-workflows 10 | name: Auto docs # the name of the action 11 | jobs: 12 | jazzyDocs: 13 | name: Jazzy docs 14 | runs-on: ubuntu-18.04 15 | steps: 16 | - uses: actions/checkout@master 17 | - name: Generate docs 18 | uses: nodes-vapor/github-actions/actions/jazzy-docs@develop 19 | with: 20 | target: Submissions # the target for which you want to build the documentation 21 | commit_msg: Update Jazzy docs # the commit message 22 | env: 23 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 24 | SOURCEKITTEN_REVISION: 0.24.0 25 | JAZZY_VERSION: 0.10.0 26 | ``` 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Nodes Vapor 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | # Package.resolved 41 | .build/ 42 | 43 | # CocoaPods 44 | # 45 | # We recommend against adding the Pods directory to your .gitignore. However 46 | # you should judge for yourself, the pros and cons are mentioned at: 47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 48 | # 49 | # Pods/ 50 | 51 | # Carthage 52 | # 53 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 54 | # Carthage/Checkouts 55 | 56 | Carthage/Build 57 | 58 | # fastlane 59 | # 60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 61 | # screenshots whenever they are needed. 62 | # For more information about the recommended setup visit: 63 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 64 | 65 | fastlane/report.xml 66 | fastlane/Preview.html 67 | fastlane/screenshots/**/*.png 68 | fastlane/test_output 69 | --------------------------------------------------------------------------------