Update OpenSSF data #11
This file contains hidden or 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
| # Update OpenSSF badging data files and create a PR | |
| name: "Update OpenSSF data" | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # Cron syntax has five fields separated by a space, and each field represents a unit of time. | |
| # | |
| # ┌───────────── minute (0 - 59) | |
| # │ ┌───────────── hour (0 - 23) | |
| # │ │ ┌───────────── day of the month (1 - 31) | |
| # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) | |
| # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) | |
| # │ │ │ │ │ | |
| # │ │ │ │ │ | |
| # │ │ │ │ │ | |
| # * * * * * | |
| # * is a special character in YAML so you have to quote this string | |
| - cron: '42 3 * * SUN' # 3:42 AM every Sunday (arbitrary) | |
| jobs: | |
| openssf-data-update-pr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v4 | |
| - name: Find OpenSSF IDs and download their data files | |
| run: | | |
| bin/get-openssf-ids.sh _software/*.md | bin/download-openssf-data.sh | |
| - name: Create pull request | |
| id: cpr | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| title: Update OpenSSF data | |
| branch: ${{ github.actor }}-openssf-data-update | |
| branch-suffix: timestamp | |
| assignees: ${{ github.actor }} | |
| commit-message: "Updating OpenSSF data" | |
| body: "Updating OpenSSF data" | |
| labels: | | |
| data update | |
| Section: software catalog | |
| - name: Check PR results | |
| if: ${{ steps.cpr.outputs.pull-request-number }} | |
| run: | | |
| echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
| echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | |
| # - name: Merge PR | |
| # if: ${{ steps.cpr.outputs.pull-request-number }} | |
| # env: | |
| # GH_TOKEN: ${{ secrets.PR_MERGE_PAT }} | |
| # run: | | |
| # gh pr merge ${{ steps.cpr.outputs.pull-request-number }} --merge --auto --body "Automatically merging script-generated event" | |