Scrape Terraform Registry Modules #988
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: Scrape Terraform Registry Modules | |
on: | |
schedule: | |
- cron: '0 0 * * */1' | |
jobs: | |
scrape-terraform-registry-modules-api: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
ref: api | |
- name: Import GPG key | |
id: import-gpg | |
uses: crazy-max/ghaction-import-gpg@v4 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Set up git config | |
run: | | |
git config --global user.email "${{ steps.import-gpg.outputs.email }}" | |
git config --global user.name "${{ steps.import-gpg.outputs.name }}" | |
- name: Scrape api | |
run: | | |
go run scripts/scrape.go -o "$PWD" | |
- name: Commit and push if there's changes | |
run: | | |
git add -A | |
git commit --signoff -m "chore: sync modules api [skip-ci]" || true | |
git push |