Sync metadata from contrib #45
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: Sync metadata from contrib | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "30 1 1,15 * *" | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
sync_metadata: | |
name: Sync metadata | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- name: Download settings from contrib | |
run: | | |
cd cfgschema | |
go run . | |
- name: Download metrics from contrib | |
run: | | |
./import_metric_metadata.sh | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: 'Metada update ${{ steps.date.outputs.date }}' | |
new_branch: metadata-update-${{ steps.date.outputs.date }} | |
add: '*.yaml' | |
default_author: github_actor | |
push: true | |
- name: Create pull request | |
run: gh pr create -B main -H metadata-update-${{ steps.date.outputs.date }} --title 'Merge metadata-update-${{ steps.date.outputs.date }} into main' --body 'Automatic sync PR to update reference files from contrib' | |
env: | |
GITHUB_TOKEN: ${{ secrets.PR_TOKEN }} |