update-packege-data #5659
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
name: update-packege-data | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0/6 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: amutake/satysfi:latest | |
steps: | |
- name: Prepare apt | |
run: apt update | |
- name: Install packages | |
run: | | |
apt install -y xz-utils ruby | |
gem install origami slack-incoming-webhooks octokit | |
- name: Install git | |
run: | | |
apt install -y software-properties-common | |
add-apt-repository -y ppa:git-core/ppa | |
apt update -y | |
apt install -y git | |
git --version | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check diffs and update | |
env: | |
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }} | |
run: | | |
export HOME=/root | |
export OPAMYES=true | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
eval $(opam env) | |
opam update | |
opam install satyrographos-snapshot-stable | |
satyrographos install | |
cd repo2json | |
cp -rL $HOME/.satysfi/dist/docs . | |
cp -rL $HOME/.satysfi/dist/fonts . | |
cp -rL $HOME/.satysfi/dist/packages . | |
find ./docs -name "*.pdf" -type f -exec ../scripts/remove-pdf-id.rb {} \; | |
git clone https://github.com/na4zagin3/satyrographos-repo.git | |
opam switch create build-repo2json 4.10.0 | |
eval $(opam env) | |
opam install . | |
make run | |
cd .. | |
scripts/add-github-repo-info.rb repo2json/packages.json $GH_API_TOKEN | |
scripts/add-command-info.rb repo2json/packages.json repo2json/packages | |
rm -rf static/docs | |
cp -rL repo2json/docs static/docs | |
scripts/update-check.sh |