diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 585ef58a3..1e8ba6553 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: Unit Tests on: pull_request: - branches: [dev, 331-staging, main] + branches: [dev, main] jobs: event_file: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1f3eafda0..834be5c0c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,9 +2,9 @@ name: "CodeQL" on: push: - branches: [ "dev" "331-staging" ] + branches: [ "dev" ] pull_request: - branches: [ "dev" "331-staging" ] + branches: [ "dev" ] schedule: - cron: '18 14 * * 5' diff --git a/.github/workflows/docker-staging.yml b/.github/workflows/docker-staging.yml deleted file mode 100644 index 68fbd531f..000000000 --- a/.github/workflows/docker-staging.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Docker (Staging) -on: - push: - branches: [ "331-staging" ] - -jobs: - build: - name: "Build (${{ matrix.component }})" - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - strategy: - fail-fast: false - matrix: - component: [frontend, backend] - include: - - component: frontend - dockerfile: production.dockerfile - args: | - "API_URL=https://circlesstagingapi.devsoc.app" - - component: backend - dockerfile: production.dockerfile - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - with: - platforms: arm64 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Log into registry ${{ env.REGISTRY }} - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GH_TOKEN }} - - name: Build and push Docker image - uses: docker/build-push-action@v3 - with: - context: ${{ matrix.component }} - push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/331-staging' }} - platforms: linux/amd64 - file: ${{ matrix.component }}/${{ matrix.dockerfile }} - build-args: ${{ matrix.args }} - tags: | - ghcr.io/csesoc/circles-staging-${{ matrix.component }}:${{ github.sha }} - ghcr.io/csesoc/circles-staging-${{ matrix.component }}:latest - labels: ${{ steps.meta.outputs.labels }} - deploy: - name: Deploy (CD) - runs-on: ubuntu-latest - needs: [build] - concurrency: production - environment: production - if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/331-staging' }} - - 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.35.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/circles-staging/${{ github.sha }} - yq -i '.items[0].spec.template.spec.containers[0].image = "ghcr.io/csesoc/circles-staging-frontend:${{ github.sha }}"' projects/circles-staging/deploy-frontend.yml - yq -i '.items[0].spec.template.spec.containers[0].image = "ghcr.io/csesoc/circles-staging-backend:${{ github.sha }}"' projects/circles-staging/deploy-backend.yml - git add . - git commit -m "feat(circles-staging): update images" - git push -u origin update/circles-staging/${{ github.sha }} - gh pr create -B migration --title "feat(circles-staging): update image" --body "Updates the image for the circles staging deployment to commit csesoc/circles-staging@${{ github.sha }}." > URL - gh pr merge $(cat URL) --squash -d diff --git a/.github/workflows/pylinter.yml b/.github/workflows/pylinter.yml index 84dd39370..90046def2 100644 --- a/.github/workflows/pylinter.yml +++ b/.github/workflows/pylinter.yml @@ -13,7 +13,7 @@ name: Pylint on: pull_request: - branches: [dev, main, 331-staging] + branches: [dev, main] jobs: build: