Skip to content

Commit fce4386

Browse files
2 parents 200c897 + 38cbb88 commit fce4386

File tree

3 files changed

+55
-3
lines changed

3 files changed

+55
-3
lines changed

.github/workflows/ai.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Download Latest Scramjet Artifact
2+
3+
on:
4+
workflow_dispatch: # allows manual trigger
5+
schedule:
6+
- cron: '0 * * * *' # runs every hour, optional — you can remove this if not needed
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
download-artifact:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout this repository
18+
uses: actions/checkout@v4
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Install GitHub CLI
23+
run: sudo apt-get update && sudo apt-get install -y gh
24+
25+
- name: Authenticate GitHub CLI
26+
run: gh auth setup-git
27+
env:
28+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Stuff
31+
id: latest_run
32+
run: |
33+
latest_run_id=$(gh run list --repo "mercuryworkshop/scramjet" --status success --limit 1 --json databaseId --jq '.[0].databaseId')
34+
35+
mkdir -p ./temp_artifact
36+
gh run download $latest_run_id \
37+
--name scramjet \
38+
--repo "mercuryworkshop/scramjet" \
39+
--dir ./temp_artifact
40+
41+
rm -rf ./public/scram
42+
mv ./temp_artifact ./public/scram
43+
44+
git config --global user.name "github-actions[bot]"
45+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
46+
git add ./public/scram
47+
git commit -am "chore: update scramjet"
48+
49+
- name: Push changes
50+
uses: ad-m/github-push-action@master
51+
with:
52+
github_token: ${{ secrets.GITHUB_TOKEN }}
53+
branch: ${{ github.ref }}

public/scram/scramjet.all.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)