Skip to content

Test different profile combinations (#35) #314

Test different profile combinations (#35)

Test different profile combinations (#35) #314

Workflow file for this run

---
name: 'Lint'
on:
pull_request: {}
push:
branches:
- 'master'
jobs:
render:
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
personal:
- false
- true
work:
- false
steps:
- name: 'Checkout repository'
uses: 'actions/checkout@v4'
- name: 'Setup Chezmoi'
uses: './.github/actions/chezmoi'
- name: 'Initialize Chezmoi'
run: 'chezmoi init --promptBool "Enable personal profile=${{ matrix.personal }},Enable work profile=${{ matrix.work }}" .'
- name: 'Render Chezmoi templates'
run: |
mkdir .home
chezmoi archive --exclude externals | tar --extract --directory .home
- name: 'Upload rendered templates'
uses: 'actions/upload-artifact@v4'
with:
name: 'personal=${{ matrix.personal }},work=${{ matrix.work }}'
path: '.home'
shellcheck:
needs: 'render'
if: '${{ always() }}'
runs-on: 'ubuntu-latest'
outputs:
files: '${{ steps.shellcheck.outputs.files }}'
steps:
- name: 'Checkout repository'
uses: 'actions/checkout@v4'
- name: 'Download rendered templates'
uses: 'actions/download-artifact@v4'
with:
path: '.home'
- id: 'shellcheck'
name: 'Run ShellCheck'
uses: 'ludeeus/action-shellcheck@2.0.0'
# CHECKME
shfmt:
needs:
- 'render'
- 'shellcheck'
if: '${{ always() }}'
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout repository'
uses: 'actions/checkout@v4'
- name: 'Download rendered templates'
uses: 'actions/download-artifact@v4'
with:
path: '.home'
- name: 'Setup shfmt'
uses: 'mfinelli/setup-shfmt@v3.0.1'
- name: 'Run shfmt'
run: 'shfmt --diff --indent=2 ${{ needs.shellcheck.outputs.files }}'
yamllint:
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout repository'
uses: 'actions/checkout@v4'
- name: 'Run yamllint'
uses: 'ibiqlik/action-yamllint@v3.1.1'