Skip to content

Commit

Permalink
Add an extra check to prevent looping
Browse files Browse the repository at this point in the history
  • Loading branch information
oskirby committed Sep 27, 2024
1 parent 57960d6 commit a35fbfa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,23 @@ jobs:
shell: bash
run: pip install requirements-parser PyYAML toml aiohttp yq

# Don't continue if there are changes to the flatpak directory.
- name: Inspect pull request
id: inspect
shell: bash
run: |
git fetch origin "${{ github.base_ref }}" --depth=1
echo -n "flatpak-changes=" >> $GITHUB_OUTPUT
git diff --name-only --relative=linux/flatpak "origin/${{ github.base_ref }}" | wc -l >> $GITHUB_OUTPUT
- name: Update flatpak rust crates
shell: bash
if: ${{ steps.inspect.outputs.flatpak-changes == 0 }}
run: ./linux/flatpak/flatpak-update-crates.sh ./Cargo.lock

- name: Commit the changes
shell: bash
if: ${{ steps.inspect.outputs.flatpak-changes == 0 }}
run: |
if git diff --name-only | grep -q '^linux/flatpak/flatpak-vpn-crates.json'; then
git add linux/flatpak/flatpak-vpn-crates.json
Expand Down

0 comments on commit a35fbfa

Please sign in to comment.