Skip to content

Commit 51784c7

Browse files
committed
chore: cleanup workflows and package.json formatting
1 parent 320ae7d commit 51784c7

File tree

4 files changed

+4
-60
lines changed

4 files changed

+4
-60
lines changed

.github/workflows/deploy-to-dev.yaml

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ env:
1616
OPENSHIFT_NAMESPACE_DEV: 6cdc9e-dev
1717
IMAGE_NAME: eagle-admin
1818
APP_NAME: eagle-admin
19-
TEST_PROMO_BRANCH: promotion/test
20-
TEST_PROMO_PR_BRANCH: promotion/test-pr
2119

2220
jobs:
2321
install:
@@ -215,57 +213,3 @@ jobs:
215213
216214
echo "Deployment successful!"
217215
oc get pods -n ${{ env.OPENSHIFT_NAMESPACE_DEV }} -l app.kubernetes.io/name=${{ env.APP_NAME }}
218-
219-
promotion:
220-
name: Create Promotion Pull Request
221-
needs: push
222-
runs-on: ubuntu-latest
223-
steps:
224-
# Update promotion/test-pr with new commit hash
225-
- name: Checkout promotion/test
226-
uses: actions/checkout@v3
227-
with:
228-
ref: "${{ env.TEST_PROMO_BRANCH }}"
229-
- name: Update state.json
230-
id: update-state
231-
run: |
232-
git config --global user.name "${{ github.actor }}"
233-
git config --global user.email "${{github.actor}}@users.noreply.github.com"
234-
235-
git checkout -B ${{ env.TEST_PROMO_PR_BRANCH }}
236-
git reset --hard ${{ env.TEST_PROMO_BRANCH }}
237-
238-
echo $(jq '.commit="${{ needs.push.outputs.SHORT_SHA }}"' state.json) > state.json
239-
240-
# Only commit if there are changes
241-
if git diff --quiet state.json; then
242-
echo "No changes to state.json, skipping commit"
243-
echo "has_changes=false" >> $GITHUB_OUTPUT
244-
else
245-
git commit -am "Promote commit ${{ needs.push.outputs.SHORT_SHA }} to Test"
246-
git push --force origin ${{ env.TEST_PROMO_PR_BRANCH }}
247-
echo "has_changes=true" >> $GITHUB_OUTPUT
248-
fi
249-
- name: Create or Update Pull Request
250-
if: steps.update-state.outputs.has_changes == 'true'
251-
run: |
252-
# Check if PR exists
253-
PR_URL=$(gh pr list --base "${{ env.TEST_PROMO_BRANCH }}" --head "${{ env.TEST_PROMO_PR_BRANCH }}" --json url --jq '.[0].url')
254-
if [ -z "$PR_URL" ]; then
255-
# Create PR if it doesn't exist
256-
gh pr create \
257-
--base "${{ env.TEST_PROMO_BRANCH }}" \
258-
--head "${{ env.TEST_PROMO_PR_BRANCH }}" \
259-
--title "Deploy to Test Environment" \
260-
--body ":crown: *An automated PR*\n\nThis PR triggers a deployment to Test once it's fully merged." \
261-
--label "auto-pr,test env,pipeline" \
262-
--draft
263-
else
264-
# Update PR if it exists
265-
gh pr edit "$PR_URL" \
266-
--title "Deploy to Test Environment" \
267-
--body ":crown: *An automated PR*\n\nThis PR triggers a deployment to Test once it's fully merged." \
268-
--add-label "auto-pr,test env,pipeline"
269-
fi
270-
env:
271-
GH_TOKEN: ${{ github.token }}

.github/workflows/deploy-to-prod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
echo "Git tag ${{ inputs.version }} verified"
4444
4545
deploy:
46-
name: Deploy to Prod
46+
name: Deploying ${{ inputs.version }} to Prod
4747
needs: validate
4848
runs-on: ubuntu-latest
4949
steps:

.github/workflows/deploy-to-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
--generate-notes
7474
7575
deploy:
76-
name: Deploy to Test
76+
name: Deploying ${{ inputs.version }} to Test
7777
needs: [validate, release]
7878
if: always() && needs.validate.result == 'success'
7979
runs-on: ubuntu-latest

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "base-app",
33
"version": "0.0.0",
44
"license": "Apache-2.0",
5+
"packageManager": "yarn@4.12.0",
56
"scripts": {
67
"ng": "ng",
78
"start": "ng serve",
@@ -75,6 +76,5 @@
7576
"puppeteer": "^24.11.2",
7677
"typescript": "~5.9.0",
7778
"vite": "^7.0.8"
78-
},
79-
"packageManager": "yarn@4.12.0"
79+
}
8080
}

0 commit comments

Comments
 (0)