diff options
| author | MagomeYae <[email protected]> | 2021-11-24 22:11:49 +0800 |
|---|---|---|
| committer | MagomeYae <[email protected]> | 2021-11-24 22:12:51 +0800 |
| commit | ea002d0fa2a3ea0639cd72d54856eb4e04699534 (patch) | |
| tree | c27e5dd18967019bdf66797badb556768c6489c9 /.github/workflows/check-aur-update.yml | |
| parent | 4b83ed90ab877fcff8ca934f4748c326a17a1876 (diff) | |
feat(ci): Use github action to automatic update aur packages
Signed-off-by: MagomeYae <[email protected]>
Diffstat (limited to '.github/workflows/check-aur-update.yml')
| -rw-r--r-- | .github/workflows/check-aur-update.yml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/check-aur-update.yml b/.github/workflows/check-aur-update.yml new file mode 100644 index 0000000..259cab5 --- /dev/null +++ b/.github/workflows/check-aur-update.yml @@ -0,0 +1,40 @@ +name: Check aur updates + +on: + schedule: + - cron: '13 * * * *' + +jobs: + check-update: + runs-on: ubuntu-latest + strategy: + fail-fast: true + + name: Build + runs-on: ${{ matrix.job.os }} + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + - name: Install requirements + shell: bash + run: | + python3 -m pip install -U -r utils/aur/requirements.txt + - name: Check updates + shell: bash + run: | + ./utils/aur/aur-check-update.py repo + - id: get_env + shell: bash + run: | + echo "::set-output name=date::$(date +%Y%m%d%H%M)" + echo "::set-output name=body::$(git diff --name-only | sed -e 's|^repo/|* |')" + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + with: + author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> + commit-message: 'Auto update aur repository ${{ steps.get_env.outputs.date }}' + title: Update aur repository + delete-branch: true + branch: update/aur-${{ steps.get_env.outputs.date }} + body: "Update packages:\n${{ steps.get_env.outputs.body }}" |
