Skip to content
12 changes: 12 additions & 0 deletions .github/workflows/auto_author_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Auto Author Assign

on: workflow_call

permissions:
pull-requests: write

jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign@4d585cc37690897bd9015942ed6e766aa7cdb97f
15 changes: 15 additions & 0 deletions .github/workflows/dependent-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Dependent Issues

on:
workflow_call:
secrets:
GITHUB_TOKEN:
required: true

jobs:
check_dependencies:
runs-on: ubuntu-latest
steps:
- uses: z0al/dependent-issues@950226e7ca8fc43dc209a7febf67c655af3bdb43
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/periphery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Periphery

on:
workflow_call:
inputs:
setup_step:
required: false
type: string
default: 'echo "Nothing to do"'

jobs:
periphery:
runs-on: [ self-hosted, iOS ]

steps:
- name: Checkout
uses: actions/checkout@v6
- uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8
- name: Setup Step
run: ${{ inputs.setup_step }}
- name: Generate
run: tuist install && tuist generate
- name: Periphery
run: periphery scan --retain-codable-properties --format github-actions --relative-results --strict
21 changes: 21 additions & 0 deletions .github/workflows/semantic-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check Commit Message

on:
workflow_call:
secrets:
GITHUB_TOKEN:
required: true

jobs:
check-commit-message:
runs-on: ubuntu-latest
steps:
- name: Check Commit Message
uses: gsactions/commit-message-checker@16fa2d5de096ae0d35626443bcd24f1e756cafee
with:
pattern: '^(Merge .+|((feat|fix|chore|docs|style|refactor|perf|ci|test)(\(.+\))?: [A-Z0-9].+[^.\s])$)'
error: 'Commit messages and PR title should match conventional commit convention and start with an uppercase.'
excludeDescription: 'true'
excludeTitle: 'false'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/swiftformat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: SwiftFormat

on: workflow_call

jobs:
format:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6
- uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8
- name: SwiftFormat
run: swiftformat --lint . --reporter github-actions-log
14 changes: 14 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: SwiftLint

on: workflow_call

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6
- uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8
- name: SwiftLint
run: swiftlint --config .swiftlint.yml --config .swiftlint-ci.yml --reporter github-actions-logging .
30 changes: 30 additions & 0 deletions .github/workflows/validate-localization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Validate localization files

on:
workflow_call:
inputs:
localizable_path:
required: true
type: string
main_target_localizable_path:
required: true
type: string
secrets:
LOCO_KEY:
required: true

jobs:
validate:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup mise
uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8
- name: Create configuration file
run: |
touch ${GITHUB_WORKSPACE}/.import_loco
echo -e "[project]\nlocalizable_path = ${GITHUB_WORKSPACE}/${{ inputs.localizable_path }}\nmain_target_localizable_path = ${GITHUB_WORKSPACE}/${{ inputs.main_target_localizable_path }}\nloco_key = $LOCO_KEY" > ${GITHUB_WORKSPACE}/.import_loco
- name: Validate
run: import_loco project -c --config-file ${GITHUB_WORKSPACE}/.import_loco
8 changes: 5 additions & 3 deletions workflow-templates/auto-author-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ on:
pull_request_target:
types: [ opened, reopened ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
pull-requests: write

jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign@v2.1.0
uses: infomaniak/.github/.github/workflows/auto_author_assign.yml@<hash>
23 changes: 9 additions & 14 deletions workflow-templates/conventional-commit.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
name: 'PR and Commit Message Check'
name: Check Commit Message

on:
pull_request_target:
pull_request:
types:
- opened
- edited
- reopened
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: Check Commit Message
uses: gsactions/commit-message-checker@v2
with:
pattern: '^(Merge .+|((feat|fix|chore|docs|style|refactor|perf|ci|test)(\(.+\))?: [A-Z0-9].+[^.\s])$)'
error: 'Commit messages and PR title should match conventional commit convention and start with an uppercase.'
excludeDescription: 'true'
excludeTitle: 'false'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
uses: infomaniak/.github/.github/workflows/semantic-commit.yml@<hash>
secrets: inherit
17 changes: 7 additions & 10 deletions workflow-templates/dependent-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@ on:
- edited
- closed
- reopened
# Makes sure we always add status check for PRs. Useful only if
# this action is required to pass before merging. Otherwise, it
# can be removed.
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: z0al/dependent-issues@v1.5.2
env:
# (Required) The token to use to make API calls to GitHub.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
check_dependencies:
uses: infomaniak/.github/.github/workflows/dependent-issues.yml@<hash>
secrets: inherit
28 changes: 7 additions & 21 deletions workflow-templates/swiftformat.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
name: SwiftFormat

on:
pull_request:
branches: [ $default-branch ]
on: pull_request

jobs:
build:
name: SwiftFormat
runs-on: [ self-hosted, iOS ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- uses: jdx/mise-action@v2
with:
cache: false
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SwiftFormat
run: swiftformat --lint . --reporter github-actions-log
jobs:
format:
uses: infomaniak/.github/.github/workflows/swiftformat.yml@<hash>
28 changes: 7 additions & 21 deletions workflow-templates/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
name: SwiftLint

on:
pull_request:
branches: [ $default-branch ]
on: pull_request

jobs:
build:
name: SwiftLint
runs-on: [ self-hosted, iOS ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- uses: jdx/mise-action@v2
with:
cache: false
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SwiftLint
run: swiftlint --config .swiftlint.yml --config .swiftlint-ci.yml --reporter github-actions-logging .
jobs:
lint:
uses: infomaniak/.github/.github/workflows/swiftlint.yml@<hash>