Update ACI Metadata #5
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 Metadata | |
on: | |
schedule: | |
- cron: '0 9 * * MON' # Every Monday at 9AM UTC | |
workflow_dispatch: | |
jobs: | |
update-metadata: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Unshallow | |
run: git fetch --prune --unshallow | |
# Get latest metadata | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Get latest metadata and generate provider code | |
run: go generate | |
env: | |
RE_GEN_CLASSES: '1' | |
GEN_ANNOTATION_UNSUPPORTED: '1' | |
- name: Check for any metadata updates | |
run: git diff --name-only | grep -E '^gen/meta/.*.json$' | |
- name: Check for any provider code diffs ignoring metadata updates | |
id: code | |
run: | | |
if [[ $(git diff --name-only | grep -Ev '^gen/meta/.*.json$') ]]; then | |
echo "Generated code difference detected" | |
echo "diff="1"" >> $GITHUB_OUTPUT | |
else | |
echo "No generated code difference detected" | |
echo "diff="0"" >> $GITHUB_OUTPUT | |
fi | |
- name: Build | |
if: steps.code.outputs.diff == '1' | |
run: go build -v | |
# Commit all new changes | |
# Create/Update a PR |