Skip to content

Commit e699966

Browse files
committed
Deployment update for qa branch
1 parent 94a3782 commit e699966

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- master
7+
- qa
78
- renovate/*
89
pull_request:
910
branches:
1011
- master
12+
- qa
1113

1214
jobs:
1315
api-ci:

.github/workflows/docker.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,35 @@ jobs:
7171
git commit -m "feat(website/prod): update image"
7272
git push -u origin update/website-prod/${{ github.sha }}
7373
gh pr create -B develop --title "feat(website/prod): update image" --body "Updates the image for the website-prod deployment to commit csesoc/csesoc-website@${{ github.sha }}." > URL
74+
gh pr merge $(cat URL) --squash -d
75+
deploy-qa:
76+
name: Deploy QA (CD)
77+
runs-on: ubuntu-latest
78+
needs: [build]
79+
concurrency: qa
80+
environment:
81+
name: qa
82+
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/qa' }}
83+
steps:
84+
- name: Checkout repository
85+
uses: actions/checkout@v4
86+
with:
87+
repository: csesoc/deployment
88+
token: ${{ secrets.GH_TOKEN }}
89+
ref: develop
90+
- name: Install yq - portable yaml processor
91+
uses: mikefarah/[email protected]
92+
- name: Update deployment
93+
env:
94+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
95+
run: |
96+
git config user.name "CSESoc CD"
97+
git config user.email "[email protected]"
98+
git checkout -b update/website-qa/${{ github.sha }}
99+
yq -i '.items[0].spec.template.spec.containers[0].image = "ghcr.io/csesoc/website-qa-backend:${{ github.sha }}"' apps/projects/website/qa/deploy-backend.yml
100+
yq -i '.items[0].spec.template.spec.containers[0].image = "ghcr.io/csesoc/website-qa-frontend:${{ github.sha }}"' apps/projects/website/qa/deploy-frontend.yml
101+
git add .
102+
git commit -m "feat(website/qa): update image"
103+
git push -u origin update/website-qa/${{ github.sha }}
104+
gh pr create -B develop --title "feat(website/qa): update image" --body "Updates the image for the website-qa deployment to commit csesoc/csesoc-website@${{ github.sha }}." > URL
74105
gh pr merge $(cat URL) --squash -d

0 commit comments

Comments
 (0)