Merge pull request #46 from buildplan/improved_restore #190
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Shell Script Linting | |
# This workflow now runs on: | |
# 1. Pushes to the main branch (if backup_script.sh changes) | |
# 2. Pushes to any branch starting with 'improve' (if backup_script.sh changes) | |
# 3. Pull requests targeting the main branch (if backup_script.sh changes) | |
on: | |
push: | |
branches: | |
- main | |
- 'improve**' # Triggers on branches like 'improve' or 'improve-new-feature' | |
paths: | |
- 'backup_script.sh' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'backup_script.sh' | |
permissions: | |
contents: read | |
jobs: | |
shellcheck: | |
name: ShellCheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Run ShellCheck | |
uses: ludeeus/[email protected] | |
with: | |
# Only fail for 'error' level issues. To see warnings, change to 'warning'. | |
severity: error | |
# Specify the script to check | |
scandir: './backup_script.sh' | |
env: | |
SHELLCHECK_OPTS: -s bash |