-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.5 KB
/
swift-dependency-updater.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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/github-app-token@v2.1.0
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@v4
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: swift-actions/setup-swift@v2.1.0
- name: Checkout swift-dependency-updater
uses: actions/checkout@v4
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