name: Dependabot Flatpak Cargo Sources on: pull_request: types: [opened, synchronize, reopened] paths: - "Cargo.lock" jobs: update-cargo-sources: if: github.actor == 'dependabot[bot]' runs-on: ubuntu-latest permissions: contents: write # Needed to push back to the branch steps: - name: Checkout code uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - name: Setup Python uses: actions/setup-python@v6 with: python-version: "3.x" - name: Install dependencies run: pip install aiohttp toml - name: Generate cargo-sources.json run: bash ./scripts/generate-sources.sh - name: Commit and push changes uses: stefanzweifel/git-auto-commit-action@v7 with: commit_message: "chore(flatpak): automatically update cargo-sources.json" file_pattern: "packages/flatpak/cargo-sources.json"