Skip to content

Commit

Permalink
Attempt to auto-update flatpak crates
Browse files Browse the repository at this point in the history
  • Loading branch information
oskirby committed Sep 27, 2024
1 parent 723d943 commit 4916841
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,39 @@ jobs:
bundle: mozillavpn.flatpak
manifest-path: manifest/org.mozilla.vpn.yml
cache-key: flatpak-builder-${{ github.sha }}

dependabot-cargo:
name: "Update flatpak crates"
runs-on: ubuntu-latest
#if: ${{ github.event_name == 'pull_request'}} && startsWith('dependabot/cargo/', gitub.head_ref)
if: ${{ github.event_name == 'pull_request'}}
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.WIKI_TOKEN }}

- name: Install pip tools
shell: bash
run: pip install requirements-parser PyYAML toml aiohttp yq

- name: Update flatpak rust crates
id: update
shell: bash
run: |
./linux/flatpak/flatpak-update-crates.sh ./Cargo.lock
echo -n "changed-files=" >> $GITHUB_OUTPUT
git diff --name-only | grep '^linux/flatpak/flatpak-vpn-crates.json' >> $GITHUB_OUTPUT
- name: Commit the changes
shell: bash
if: ${{ steps.update.outputs.changed-files }}
run: |
git add ${{ steps.update.outputs.changed-files }}
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git commmit -m "[dependabot skip] Update linux/flatpak/flatpak-vpn-crates.json"
# TODO: I am scared. Let's check this first...
# git push
git format-patch --stdout HEAD~1

0 comments on commit 4916841

Please sign in to comment.