Skip to content

Commit

Permalink
Fix issues in .github/workflows/check-snapshots.yml
Browse files Browse the repository at this point in the history
```
Don't use variables in the printf format string. Use printf '..%s..' "$foo" [shellcheck]

Use -n instead of ! -z [shellcheck]

Use $(...) notation instead of legacy backticks `...`
```
  • Loading branch information
kwk committed Feb 5, 2025
1 parent 556b0d7 commit df8549e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
COPR_CONFIG_FILE: ${{ secrets.COPR_CONFIG }}
run: |
mkdir -p ~/.config
printf "$COPR_CONFIG_FILE" > ~/.config/copr
echo $COPR_CONFIG_FILE > ~/.config/copr
- name: Install Copr CLI
if: github.event_name != 'workflow_dispatch' || (matrix.today_minus_n_days == 0 && inputs.strategy == matrix.name)
Expand All @@ -83,14 +83,14 @@ jobs:
run: |
extra_args=""
if [[ ! -z "${{ matrix.chroot_pattern }}" ]]; then
if [[ -n "${{ matrix.chroot_pattern }}" ]]; then
extra_args="${extra_args} --chroot-pattern ${{matrix.chroot_pattern}}"
fi
if [[ "${{github.event_name}}" == "workflow_dispatch" ]]; then
yyyymmdd=${{inputs.yyyymmdd}}
else
yyyymmdd=`date --date='${{matrix.today_minus_n_days}} days ago' +%Y%m%d`
yyyymmdd=$(date --date='${{matrix.today_minus_n_days}} days ago' +%Y%m%d)
fi
python3 snapshot_manager/main.py \
Expand Down

0 comments on commit df8549e

Please sign in to comment.