Skip to content

Commit

Permalink
Apply swift-dependency-updater to our own repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Nef10 committed May 29, 2021
1 parent e170a4d commit dfb18df
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/swift-dependency-updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Swift Dependency Updater

on:
schedule:
- cron: '17 10 * * 5' # Run every Friday at 10:17 UTC
workflow_dispatch: # Allows to manually trigger the script

permissions: # The workflow does not need speific permissions as we use a different token
contents: read

jobs:
test:
name: Update Swift Dependencies
runs-on: ubuntu-latest # The action supports macOS-latest as well
steps:
- name: Generate token
id: generate_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }} # These two secrets need to be added
private_key: ${{ secrets.APP_PRIVATE_KEY }} # to your repository settings
- name: Checkout code
uses: actions/checkout@v2
with:
path: repo
fetch-depth: 0 # Fetching the whole repo is required to check if branches already exist
token: ${{ steps.generate_token.outputs.token }} # Checkout repo pre-configured with right token
- name: Install Swift
uses: fwal/[email protected]
- name: Checkout swift-dependency-updater
uses: actions/checkout@v2
with:
repository: Nef10/swift-dependency-updater
path: swift-dependency-updater
ref: main # specify a version tag or use main to always use the latest code
- name: Run swift-dependency-updater
run: cd swift-dependency-updater && swift run swift-dependency-updater github ../repo
env:
TOKEN: ${{ steps.generate_token.outputs.token }} # Required to open the Pull Requests

0 comments on commit dfb18df

Please sign in to comment.