time <-> class sql relation created #11
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
name: Docker | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: 'Build' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log into registry ${{ env.REGISTRY }} | |
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@v5 | |
with: | |
push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }} | |
platforms: linux/amd64 | |
file: Dockerfile | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-args: | | |
HASURAGRES_API_KEY=${{ secrets.HASURAGRES_API_KEY }} | |
HASURAGRES_URL=${{ secrets.HASURAGRES_URL }} | |
tags: | | |
ghcr.io/csesoc/spooderman:${{ github.sha }} | |
ghcr.io/csesoc/spooderman:latest | |
labels: ${{ steps.meta.outputs.labels }} | |
deploy: | |
name: Deploy (CD) | |
runs-on: ubuntu-latest | |
needs: [build] | |
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }} | |
concurrency: production | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
repository: csesoc/deployment | |
token: ${{ secrets.GH_TOKEN }} | |
ref: migration | |
- name: Install yq - portable yaml processor | |
uses: mikefarah/yq@v4.44.2 | |
- name: Update deployment | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
git config user.name "CSESoc CD" | |
git config user.email "technical@csesoc.org.au" | |
git checkout -b update/spooderman/${{ github.sha }} | |
yq -i '.spec.jobTemplate.spec.template.spec.containers[0].image = "ghcr.io/csesoc/spooderman:${{ github.sha }}"' projects/spooderman/cronjob.yml | |
git add . | |
git commit -m "feat(spooderman): update images" | |
git push -u origin update/spooderman/${{ github.sha }} | |
gh pr create -B migration --title "feat(spooderman): update images" --body "Updates the images for the spooderman timetable scraper deployment to commit csesoc/spooderman@${{ github.sha }}." > URL | |
gh pr merge $(cat URL) --squash -d |