π update #891
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 | |
on: | |
schedule: | |
- cron: '0 12 * * *' | |
push: | |
paths: | |
- '.github/workflows/update.yml' | |
workflow_dispatch: | |
jobs: | |
update: | |
name: update | |
runs-on: macOS-latest | |
steps: | |
- name: β¬οΈ Checkout | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 1 | |
- name: π Install gallery-workflow | |
run: | | |
rm -f .build/release/gallery-workflow | |
curl -L https://github.com/$GITHUB_REPOSITORY-workflow/releases/latest/download/gallery-workflow.zip --output gallery-workflow.zip | |
unzip gallery-workflow.zip | |
rm gallery-workflow.zip | |
if [ -f .build/release/gallery-workflow ]; then | |
echo "gallery-workflow installed" | |
.build/release/gallery-workflow --version | |
else | |
echo "gallery-workflow cannot be downloaded using url https://github.com/$GITHUB_REPOSITORY-workflow/releases/latest/download/gallery-workflow.zip" | |
exit 1 | |
fi | |
- name: π· Update releases | |
run: | | |
.build/release/gallery-workflow --github-token "${{ secrets.PUBLISH_TOKEN }}" | |
- name: π₯ Aggregate by topics | |
run: | | |
.build/release/gallery-workflow aggregate | |
- name: π§Ή Format | |
run: | | |
brew install yq | |
./.github/outputpretty.sh | |
- name: β¬οΈ Push | |
run: | | |
rm -f .build/release/gallery-workflow | |
git add . | |
git config --local user.email "eric.marchand@4d.com" | |
git config --local user.name "mesopelagique" | |
git diff --quiet && git diff --staged --quiet || git commit -a -m "π Update" | |
./.github/push.sh "main" "${{ secrets.PUBLISH_TOKEN }}" |