-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (81 loc) · 2.34 KB
/
ci-system-upgrade_tools_and_clean.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Leka - iOS Monorepo
# Copyright 2023 APF France handicap
# SPDX-License-Identifier: Apache-2.0
name: System - Upgrade tools & clean
on:
pull_request:
types: [labeled]
schedule:
# Runs at 3:00 UTC every day
- cron: '0 3 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
upgrade_tools:
if: ${{ contains(github.event.label.name, 'ci:upgrade_tools') || contains(github.event_name, 'schedule') }}
name: Upgrade tools
runs-on: [self-hosted, iOS]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1 # shallow clone
- name: Tools' versions before
run: |
which xcodebuild
xcodebuild -version
which fastlane
fastlane --version
which tuist
tuist version
which swiftlint
swiftlint --version
which swift-format
swift-format --version
which bundle
bundle --version
- name: Upgrade brew
run: |
brew update
brew upgrade
brew reinstall tuist --no-quarantine
brew cleanup -s --prune=all
- name: Upgrade bundle
run: |
bundle update --bundler
- name: tuist clean
run: |
tuist clean
- name: Delete Xcode derived data
run: |
rm -rf ~/Library/Developer/Xcode/DerivedData
- name: Tools' versions after
run: |
which xcodebuild
xcodebuild -version
which fastlane
fastlane --version
which tuist
tuist version
which swiftlint
swiftlint --version
which swift-format
swift-format --version
which bundle
bundle --version
- name: Remove label
if: contains(github.event.label.name, 'ci:upgrade_tools')
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const { LABEL_NAME } = process.env
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: LABEL_NAME
})
env:
LABEL_NAME: ${{ github.event.label.name }}