Skip to content

chore(ci): switch to deployments, catch bugs, update tests #281

chore(ci): switch to deployments, catch bugs, update tests

chore(ci): switch to deployments, catch bugs, update tests #281

Workflow file for this run

name: PR
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploys:
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
backend: ${{ steps.trigger.outputs.backend }}
database: ${{ steps.trigger.outputs.database }}
frontend: ${{ steps.trigger.outputs.frontend }}
strategy:
matrix:
# name: [ backend, database, frontend ]
include:
# - name: backend
# file: templates/backend.yml
# overwrite: true
# parameters: -p MIN_REPLICAS=1 -p MAX_REPLICAS=2
# verification_path: /api
- name: database
file: templates/database.yml
overwrite: false
# - name: frontend
# file: templates/frontend.yml
# oc_version: 4.13
# overwrite: true
# parameters: -p MIN_REPLICAS=1 -p MAX_REPLICAS=2
# post_rollout: |
# oc create job "frontend-$(date +%s)" --from=cronjob/${{ github.event.repository.name }}-${{ github.event.number }}-cronjob
steps:
- uses: actions/checkout@v4
- id: deploys
uses: ./
with:
file: ${{ matrix.file }}
oc_namespace: ${{ vars.OC_NAMESPACE }}
oc_server: ${{ vars.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
oc_version: ${{ matrix.oc_version }}
overwrite: ${{ matrix.overwrite }}
parameters: -p ZONE=${{ github.event.number }} -p TAG=${{ github.event.number }}
${{ matrix.parameters }}
post_rollout: ${{ matrix.post_rollout }}
verification_path: ${{ matrix.verification_path }}
- id: trigger
run: echo "${{ matrix.name }}=${{ steps.deploys.outputs.triggered }}" >> $GITHUB_OUTPUT
results:
name: Results
runs-on: ubuntu-latest
needs: [deploys]
steps:
- run: |
# Expand for outputs
echo "Results: ${{ toJson(needs.deploys.outputs) }}"
echo "Database triggered: ${{needs.deploys.outputs.database}}"
echo "Backend triggered: ${{needs.deploys.outputs.backend}}"
echo "Frontend triggered: ${{needs.deploys.outputs.frontend}}"