Skip to content

Commit f802358

Browse files
authored
Update ai.yml
1 parent 83c8c0b commit f802358

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

.github/workflows/ai.yml

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,42 +30,28 @@ jobs:
3030
- name: Find the latest successful workflow run
3131
id: latest_run
3232
run: |
33-
echo "Finding latest successful run for mercuryworkshop/scramjet..."
3433
latest_run_id=$(gh run list --repo "mercuryworkshop/scramjet" --status success --limit 1 --json databaseId --jq '.[0].databaseId')
35-
if [ -z "$latest_run_id" ]; then
36-
echo "❌ No workflow runs found."
37-
exit 1
38-
fi
39-
echo "✅ Found latest run ID: $latest_run_id"
40-
echo "run_id=$latest_run_id" >> $GITHUB_OUTPUT
41-
env:
42-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4334
44-
- name: Download scramjet artifact
45-
run: |
46-
echo "Downloading artifact 'scramjet' from run ID: ${{ steps.latest_run.outputs.run_id }}"
4735
mkdir -p ./temp_artifact
48-
gh run download ${{ steps.latest_run.outputs.run_id }} \
36+
gh run download $latest_run_id \
4937
--name scramjet \
5038
--repo "mercuryworkshop/scramjet" \
5139
--dir ./temp_artifact
52-
env:
53-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5440
55-
- name: Prepare target directory
56-
run: |
5741
rm -rf ./public/scram
58-
mkdir -p ./public
59-
60-
- name: Move artifact to /public/scram
61-
run: mv ./temp_artifact ./public/scram
42+
mv ./temp_artifact ./public/scram
43+
env:
44+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6245

63-
- name: Verify extraction
46+
47+
- name: Commit and push changes
6448
run: |
65-
echo "Contents of /public/scram:"
66-
ls -al ./public/scram
49+
git config --global user.name "github-actions[bot]"
50+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
51+
git add ./public/scram
52+
git commit -m "Update Scramjet artifact from mercuryworkshop/scramjet" || echo "No changes to commit"
6753
68-
- name: Commit and push changes
54+
- name: Push changes
6955
uses: ad-m/github-push-action@master
7056
with:
7157
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)