-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply swift-dependency-updater to our own repo
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
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
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 |