Skip to content

Commit

Permalink
chore(ci): update docker.yml (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChinoGoblino authored Aug 3, 2024
1 parent 61c2d56 commit 3c547a5
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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

0 comments on commit 3c547a5

Please sign in to comment.