Skip to content

Use reusable workflows for supergraph CI #1384

Use reusable workflows for supergraph CI

Use reusable workflows for supergraph CI #1384

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
helm_lint:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
uses: ./.github/workflows/_helm_lint.yaml
kyverno_policy:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
uses: ./.github/workflows/_kyverno_policy.yaml
sessionspaces_code:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
uses: ./.github/workflows/_sessionspaces_code.yaml
sessionspaces_container:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
needs: sessionspaces_code
uses: ./.github/workflows/_sessionspaces_container.yaml
permissions:
contents: read
packages: write
graph_proxy_code:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
uses: ./.github/workflows/_graph_proxy_code.yaml
graph_proxy_schema:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
needs: graph_proxy_code
uses: ./.github/workflows/_graph_proxy_schema.yaml
graph_proxy_container:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
needs: graph_proxy_code
uses: ./.github/workflows/_graph_proxy_container.yaml
permissions:
contents: read
packages: write
supergraph_update:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
needs: graph_proxy_schema
runs-on: ubuntu-latest
steps:
- name: Update Supergraph
uses: diamondlightsource/graph-federation@main
with:
name: workflows
routing-url: https://workflows.diamond.ac.uk/graphql
subgraph-schema-artifact: graph-proxy
subgraph-schema-filename: workflows.graphql
github-app-id: 1010045
github-app-private-key: ${{ secrets.GRAPH_FEDERATOR }}
publish: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
frontend_code:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
needs: supergraph_update
uses: ./.github/workflows/_frontend_code.yaml
dashboard_container:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
needs: frontend_code
uses: ./.github/workflows/_dashboard_container.yaml
permissions:
contents: read
packages: write
github_pages:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
uses: ./.github/workflows/_github_pages.yaml
permissions:
pages: write
id-token: write