Skip to content

👷 (tools): Add workflow to upgrade tools #5

👷 (tools): Add workflow to upgrade tools

👷 (tools): Add workflow to upgrade tools #5

# Leka - iOS Monorepo
# Copyright 2023 APF France handicap
# SPDX-License-Identifier: Apache-2.0
name: System - Tools Upgrade
on:
pull_request:
types: [labeled]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
upgrade_tools:
if: contains(github.event.label.name, 'ci:upgrade_tools')
name: Upgrade tools
runs-on: [self-hosted, iOS]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1 # shallow clone
- name: Tools' versions
run: |
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 cleanup -s --prune=all
- name: Upgrade bundle
run: |
bundle update --bundler
- name: remove label
if: always()
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 }}