We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b898c1 commit 9ab6f28Copy full SHA for 9ab6f28
cli/src/commands/updateAssets.ts
@@ -159,7 +159,18 @@ export async function updateAssets() {
159
core.info('Committing and pushing changes')
160
execSync('git add .')
161
execSync('git commit -m "chore: update assets"')
162
- execSync('git push --force-with-lease')
+
163
+ //* Fetch latest changes and attempt to push
164
+ try {
165
+ core.info('Fetching latest changes...')
166
+ execSync('git fetch')
167
+ execSync('git push --force-with-lease')
168
+ }
169
+ catch {
170
+ core.warning('Failed to push with --force-with-lease, attempting to rebase and retry...')
171
+ execSync('git pull --rebase')
172
173
174
175
await octokit.rest.repos.createCommitStatus({
176
...context.repo,
0 commit comments