File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -232,22 +232,25 @@ jobs:
232232 env :
233233 BRANCH : " deploy-state"
234234 ENV : " ${{ inputs.WF_ENV_TYPE_DEPLOY }}"
235+ FILE : " .deploys/service.json"
235236 run : |
236- fetch origin $BRANCH:$BRANCH || git worktree add ../deploy-worktree $BRANCH
237- cp "$FILE" ../deploy-worktree/$FILE
238-
239- cd ../deploy-worktree
240-
241237 git config user.name "github-actions"
242238 git config user.email "actions@github.com"
243239
244- git fetch origin $BRANCH:$BRANCH || git checkout --orphan $BRANCH
245- git switch $BRANCH
240+ # Cria diretório isolado para o worktree
241+ git fetch origin $BRANCH:$BRANCH || true
242+ git worktree add ../deploy-worktree $BRANCH
243+
244+ # Copia o service.json gerado
245+ cp "$FILE" ../deploy-worktree/$FILE
246+
247+ cd ../deploy-worktree
246248
247249 git add "$FILE"
248- git commit -m "chore(ci): update digest for $ENV [skip ci]"
250+ git commit -m "chore(ci): promote $ENV from dev to $ENV [skip ci]" || echo "⚠️ Nothing to commit "
249251 git push origin $BRANCH
250252
253+
251254 - name : Open PR to main if needed
252255 if : ${{ inputs.WF_CREATE_PR_IN_MAIN }}
253256 env :
You can’t perform that action at this time.
0 commit comments