Skip to content

chore(ci): use official RH oc setup action #312

chore(ci): use official RH oc setup action

chore(ci): use official RH oc setup action #312

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-24.04
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
verification_path: /api
- name: database
file: templates/database.yml
overwrite: false
- name: frontend
file: templates/frontend.yml
oc_version: 4.13
overwrite: true
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 }} ${{ 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-24.04
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}}"