Update index #1912
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 index | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: false | |
jobs: | |
update-index: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: coursier/[email protected] | |
- uses: coursier/[email protected] | |
with: | |
jvm: 11 | |
- run: ./scala-cli.sh src | |
env: | |
GH_TOKEN: ${{ secrets.INDEX_GITHUB_TOKEN }} | |
- name: Print diff | |
run: git diff --color | |
- name: Create Pull Request | |
if: github.ref == 'refs/heads/master' | |
id: cpr | |
uses: peter-evans/[email protected] | |
with: | |
commit-message: Update index | |
author: GitHub <[email protected]> | |
delete-branch: true | |
title: Update index | |
- name: Generate Job Summary | |
if: github.ref == 'refs/heads/master' | |
run: |- | |
PR_NUMBER=$(echo "${{ steps.cpr.outputs.pull-request-number }}") | |
PR_URL=$(echo "${{ steps.cpr.outputs.pull-request-url }}") | |
echo "## Index Update Summary" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "Pull Request Number - **${PR_NUMBER}**" >> $GITHUB_STEP_SUMMARY | |
echo "Pull Request URL - **${PR_URL}**" >> $GITHUB_STEP_SUMMARY |