-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61c2d56
commit 3c547a5
Showing
1 changed file
with
14 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,28 +15,28 @@ jobs: | |
fail-fast: false | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: arm64 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
uses: docker/login-action@v2 | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GH_TOKEN }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: ${{ github.event_name != 'pull_request' }} | ||
platforms: linux/amd64 | ||
file: Dockerfile | ||
tags: | | ||
ghcr.io/csesoc/tech-spire-2022:${{ github.sha }} | ||
ghcr.io/csesoc/tech-spire-2022:latest | ||
ghcr.io/csesoc/tech-spire-2024:${{ github.sha }} | ||
ghcr.io/csesoc/tech-spire-2024:latest | ||
labels: ${{ steps.meta.outputs.labels }} | ||
deploy: | ||
name: Deploy (CD) | ||
|
@@ -46,10 +46,11 @@ jobs: | |
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: csesoc/deployment | ||
token: ${{ secrets.GH_TOKEN }} | ||
ref: migration | ||
- name: Install yq - portable yaml processor | ||
uses: mikefarah/[email protected] | ||
- name: Update deployment | ||
|
@@ -58,10 +59,10 @@ jobs: | |
run: | | ||
git config user.name "CSESoc CD" | ||
git config user.email "[email protected]" | ||
git checkout -b update/tech-spire-2022/${{ github.sha }} | ||
yq -i '.items[0].spec.template.spec.containers[0].image = "ghcr.io/csesoc/tech-spire-2022:${{ github.sha }}"' apps/projects/tech-spire-2022/deploy.yml | ||
git checkout -b update/tech-spire-2024/${{ github.sha }} | ||
yq -i '.items[0].spec.template.spec.containers[0].image = "ghcr.io/csesoc/tech-spire-2024:${{ github.sha }}"' apps/projects/tech-spire-2024/deploy.yml | ||
git add . | ||
git commit -m "feat(tech-spire-2022): update images" | ||
git push -u origin update/tech-spire-2022/${{ github.sha }} | ||
gh pr create --title "feat(tech-spire-2022): update image" --body "Updates the images for the tech-spire-2022 deployment to commit csesoc/tech-spire-2022@${{ github.sha }}." > URL | ||
git commit -m "feat(tech-spire-2024): update images" | ||
git push -u origin update/tech-spire-2024/${{ github.sha }} | ||
gh pr create -B migration --title "feat(tech-spire-2024): update image" --body "Updates the images for the tech-spire-2024 deployment to commit csesoc/tech-spire-2024@${{ github.sha }}." > URL | ||
gh pr merge $(cat URL) --squash -d |