Skip to content

Commit 1a022ce

Browse files
authored
Update platform-deploy.yml (#718)
Update
1 parent 54127c2 commit 1a022ce

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/platform-deploy.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,39 @@ jobs:
100100
run: |
101101
mkdir -p ~/.ansible/roles
102102
cp -r ansible/roles/* ~/.ansible/roles/
103+
# Update platform version in network config
104+
- name: Update platform version in network config
105+
run: |
106+
# Update dashmate_version
107+
sed -i "s/dashmate_version: .*/dashmate_version: ${{ github.event.inputs.platform_version }}/" networks/${{ github.event.inputs.network }}.yml
108+
109+
# Update platform service image versions
110+
sed -i "s/drive_image: dashpay\/drive:[^ ]*/drive_image: dashpay\/drive:${{ github.event.inputs.platform_version }}/" networks/${{ github.event.inputs.network }}.yml
111+
sed -i "s/dapi_image: dashpay\/dapi:[^ ]*/dapi_image: dashpay\/dapi:${{ github.event.inputs.platform_version }}/" networks/${{ github.event.inputs.network }}.yml
112+
113+
echo "Updated network config:"
114+
grep -E "(dashmate_version|drive_image|dapi_image)" networks/${{ github.event.inputs.network }}.yml
115+
116+
# Commit and push updated config back to repository
117+
- name: Commit and push updated network config
118+
run: |
119+
cd networks
120+
git config user.name "GitHub Actions"
121+
git config user.email "[email protected]"
122+
123+
# Check if there are changes to commit
124+
if git diff --quiet; then
125+
echo "No changes to commit"
126+
else
127+
git add ${{ github.event.inputs.network }}.yml
128+
git commit -m "Update ${{ github.event.inputs.network }} platform version to ${{ github.event.inputs.platform_version }}
129+
130+
🤖 Generated with [GitHub Actions](https://github.com/dashpay/dash-network-deploy/actions)
131+
132+
Co-Authored-By: GitHub Actions <[email protected]>"Add commentMore actions
133+
git push origin main
134+
echo "Successfully pushed updated config to repository"
135+
fi
103136
104137
# Run platform deployment
105138
- name: Run Platform Deployment

0 commit comments

Comments
 (0)