Package updates #1471
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Copyright 2020 Termux | |
## | |
## Licensed under the Apache License, Version 2.0 (the "License"); | |
## you may not use this file except in compliance with the License. | |
## You may obtain a copy of the License at | |
## | |
## http://www.apache.org/licenses/LICENSE-2.0 | |
## | |
## Unless required by applicable law or agreed to in writing, software | |
## distributed under the License is distributed on an "AS IS" BASIS, | |
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
## See the License for the specific language governing permissions and | |
## limitations under the License. | |
## | |
name: Package updates | |
on: | |
schedule: | |
- 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-user-repository/pypi-wheel-builder' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone tur-pypi | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
token: ${{ secrets.GH_TOKEN }} | |
path: ${{ github.workspace }} | |
- name: Clone tur | |
uses: actions/checkout@v3 | |
with: | |
repository: termux-user-repository/tur | |
fetch-depth: 1 | |
path: ${{ github.workspace }}/tur-repo | |
- name: Free additional disk space | |
run: | | |
sudo apt purge -yq $(dpkg -l | grep '^ii' | awk '{ print $2 }' | grep -P '(aspnetcore|cabal-|dotnet-|ghc-|libmono|php)') \ | |
firefox google-chrome-stable microsoft-edge-stable mono-runtime-common monodoc-manual ruby | |
sudo apt autoremove -yq | |
sudo rm -fr /opt/hostedtoolcache /usr/local /usr/share/dotnet /usr/share/swift | |
- name: Merge repos | |
run: | | |
cp -rn ./tur-repo/* ./ | |
rm -rf ./tur-repo | |
./setup-environment.sh | |
- name: Process package updates | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
BUILD_PACKAGES: "true" | |
GIT_COMMIT_PACKAGES: "true" | |
GIT_PUSH_PACKAGES: "true" | |
CREATE_ISSUE: "true" | |
run: | | |
git config --global user.name "TUR Github Actions" | |
git config --global user.email "[email protected]" | |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | |
./scripts/bin/update-packages ${{ github.event.inputs.packages }} | |
else | |
./scripts/bin/update-packages "@all" | |
fi |