ci(package_updates.yml): adhere to new update system
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
This commit is contained in:
parent
bd99580451
commit
5377dbc8b8
42
.github/workflows/package_updates.yml
vendored
42
.github/workflows/package_updates.yml
vendored
@ -2,26 +2,36 @@ name: Package updates
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 */6 * * *'
|
||||
- cron: "0 */6 * * *"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
packages:
|
||||
description: "A space-seperated list of packages to update. Defaults to all packages"
|
||||
default: "@all"
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
update-packages:
|
||||
if: github.repository == 'termux/termux-packages'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GH_API_KEY }}
|
||||
- name: Process package updates
|
||||
env:
|
||||
GITHUB_API_TOKEN: ${{ secrets.GH_API_KEY }}
|
||||
BUILD_PACKAGES: "true"
|
||||
GIT_COMMIT_PACKAGES: "true"
|
||||
GIT_PUSH_PACKAGES: "true"
|
||||
run: |
|
||||
git config --global user.name "Termux Github Actions"
|
||||
git config --global user.email "contact@termux.org"
|
||||
bash ./scripts/bin/update-packages
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GH_API_KEY }}
|
||||
- name: Process package updates
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_API_KEY }}
|
||||
BUILD_PACKAGES: "true"
|
||||
GIT_COMMIT_PACKAGES: "true"
|
||||
GIT_PUSH_PACKAGES: "true"
|
||||
run: |
|
||||
git config --global user.name "Termux Github Actions"
|
||||
git config --global user.email "contact@termux.com"
|
||||
|
||||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
||||
./scripts/bin/update-packages ${{ github.event.inputs.packages }}
|
||||
else
|
||||
./scripts/bin/update-packages "@all"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user