Skip to content

Commit cf9c2ba

Browse files
committed
refactor: commit metadata updates directly and push tags
Replace PR workflow with direct commits and tag pushing to trigger the publish pipeline automatically.
1 parent 57e0862 commit cf9c2ba

File tree

1 file changed

+13
-27
lines changed

1 file changed

+13
-27
lines changed

.github/workflows/update-metadata.yml

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -65,39 +65,25 @@ jobs:
6565
echo "New version: $NEW_VERSION"
6666
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
6767
68-
- name: Create Pull Request
68+
- name: Commit changes
6969
if: steps.check_changes.outputs.changes == 'true'
70-
uses: peter-evans/create-pull-request@v5
71-
with:
72-
commit-message: |
73-
chore: update instance metadata and bump version to ${{ env.NEW_VERSION }}
74-
75-
- Updates instance metadata from AWS EC2 page
76-
- Bumps package version to ${{ env.NEW_VERSION }}
77-
title: "chore: weekly instance metadata update"
78-
body: |
79-
🤖 Weekly Instance Metadata Update
80-
81-
This PR:
82-
- Updates instance metadata from AWS EC2 page
83-
- Bumps package version to ${{ env.NEW_VERSION }}
84-
85-
### Changes Summary
86-
The instance metadata has been updated with the latest information from AWS.
87-
88-
Please review the changes in `instance_metadata.json` to ensure the data looks correct.
89-
branch: metadata-update
90-
base: main
91-
labels: |
92-
automated
93-
metadata-update
70+
run: |
71+
git add spot_optimizer/resources/instance_metadata.json pyproject.toml poetry.lock
72+
git commit -m "chore: update instance metadata and bump version to ${{ env.NEW_VERSION }}"
73+
74+
- name: Create and push tag
75+
if: steps.check_changes.outputs.changes == 'true'
76+
run: |
77+
git tag "v${{ env.NEW_VERSION }}"
78+
git push origin main
79+
git push origin "v${{ env.NEW_VERSION }}"
9480
9581
- name: Output summary
9682
if: steps.check_changes.outputs.changes == 'true'
9783
run: |
98-
echo "✅ Metadata update PR created successfully"
84+
echo "✅ Metadata update committed and tagged successfully"
9985
echo "Version bumped to: ${{ env.NEW_VERSION }}"
100-
echo "Once merged, this will trigger the publish workflow"
86+
echo "Tag v${{ env.NEW_VERSION }} pushed - this will trigger the publish workflow"
10187
10288
- name: No changes summary
10389
if: steps.check_changes.outputs.changes == 'false'

0 commit comments

Comments
 (0)