forked from TheEvilSkeleton/leafish-flatpak-nightly
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (46 loc) · 1.54 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Update
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
env:
MANIFEST_PATH: com.github.Lea_fish.Leafish.yaml # Path to manifest
REPO: # link to project repository (optional)
jobs:
update:
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub/flatpak-external-data-checker
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Update manifest
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
set -x
git clone -b main https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git main
cd main
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
/app/flatpak-external-data-checker --update --commit-only ${MANIFEST_PATH}
- name: Update Rust dependencies
continue-on-error: true
run: |
set -x
apt-get install -y python3-aiohttp python3-toml
git clone --recurse-submodules -b main https://github.com/Lea-fish/Leafish.git leafish
cd leafish
git clone https://github.com/flatpak/flatpak-builder-tools.git flatpak-builder-tools
python3 flatpak-builder-tools/cargo/flatpak-cargo-generator.py Cargo.lock -o ../main/cargo-sources.json
cd ../main
git add cargo-sources.json
git commit -m "Update cargo-sources.json"
- name: Push to branch
continue-on-error: true
run: |
set -x
cd main
git push origin HEAD:main