mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update build-new-demo.sh
This commit is contained in:
parent
0d7b6dc5b8
commit
7166335bf2
36
.github/workflows/build-new-demo.sh
vendored
36
.github/workflows/build-new-demo.sh
vendored
@ -19,6 +19,42 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up SSH key
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
|
||||
- name: Run Rebuild Script and Capture Snapshot ID
|
||||
id: rebuild
|
||||
run: |
|
||||
chmod +x demo/rebuild.sh
|
||||
output=$(./demo/rebuild.sh)
|
||||
echo "$output"
|
||||
snapshot_id=$(echo "$output" | grep -oP 'Snapshot ID: \K.*')
|
||||
echo "Snapshot ID captured: $snapshot_id"
|
||||
echo "snapshot_id=$snapshot_id" >> $GITHUB_ENV
|
||||
|
||||
- name: Update SNAPSHOT_ID.env
|
||||
run: |
|
||||
echo "SNAPSHOT_ID=${{ env.snapshot_id }}" > demo/SNAPSHOT_ID.env
|
||||
|
||||
- name: Commit and Push Updates
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add demo/SNAPSHOT_ID.env
|
||||
git commit -m "Demo rebuilt with new version - snapshot id: ${{ env.snapshot_id }}"
|
||||
git push
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Set up SSH key
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
|
Loading…
Reference in New Issue
Block a user