Skip to content

Workflow file for this run

on:
push:
# branches:
# - main
env:
REGISTRY: ghcr.io
VERSION: v0.1.0
# VERSION: ${{ github.event.release.tag_name }}
jobs:
#
# Build
#
build-backend:
name: Build / ${{ matrix.config.name }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- config:
name: Gateway
service: gateway
context: ./modules/services/gateway
- config:
name: Database
service: database
context: ./modules/services/database/modules/database
- config:
name: Database Boostrtap
service: database-bootstrap
context: ./modules/services/database/modules/bootstrap
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup Docker
uses: docker/setup-buildx-action@v2
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push docker image
uses: docker/build-push-action@v6
with:
context: ${{ matrix.config.context }}
# push: true
load: true
tags: |
ghcr.io/akdasa-studios/lectorium-${{ matrix.config.service }}:${{ env.VERSION }}-dev
- name: push docker image
run: |
docker push ghcr.io/akdasa-studios/lectorium-${{ matrix.config.service }}:${{ env.VERSION }}-dev
build-mobile-staging:
name: Build / ${{ matrix.config.name }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- config:
name: Android
- config:
name: iOS
- config:
name: Web
steps:
- name: Build App
run: |
echo "Running E2E tests"
echo "Tests passed"
deploy-staging:
name: Deploy / Staging
runs-on: ubuntu-latest
environment: Staging
needs: build-backend
permissions:
contents: read
packages: write
steps:
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Promote Images
run: |
for service in gateway database database-bootstrap; do
docker pull ghcr.io/akdasa-studios/lectorium-$service:${{ env.VERSION }}-dev
docker tag ghcr.io/akdasa-studios/lectorium-$service:${{ env.VERSION }}-dev ghcr.io/akdasa-studios/lectorium-$service:${{ env.VERSION }}-rc
docker push ghcr.io/akdasa-studios/lectorium-$service:${{ env.VERSION }}-rc
done
tests-e2e:
name: E2E Tests
runs-on: ubuntu-latest
needs: [deploy-staging, build-mobile]

Check failure on line 116 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 116, Col: 29): Job 'tests-e2e' depends on unknown job 'build-mobile'. .github/workflows/release.yml (Line: 131, Col: 13): Job 'build-mobile-production' depends on job 'tests-e2e' which creates a cycle in the dependency graph.
permissions:
contents: read
packages: write
steps:
- name: Run E2E Tests
run: |
echo "Running E2E tests"
echo "Tests passed"
build-mobile-production:
name: Build / ${{ matrix.config.name }}
runs-on: ubuntu-latest
needs: [tests-e2e]
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- config:
name: Android
- config:
name: iOS
- config:
name: Web
steps:
- name: Build App
run: |
echo "Running E2E tests"
echo "Tests passed"
deploy-production:
name: Deploy / Production
runs-on: ubuntu-latest
environment: Production
needs: [tests-e2e]
permissions:
contents: read
packages: write
steps:
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Promote Images
run: |
for service in gateway database database-bootstrap; do
docker pull ghcr.io/akdasa-studios/lectorium-$service:${{ env.VERSION }}-rc
docker tag ghcr.io/akdasa-studios/lectorium-$service:${{ env.VERSION }}-rc ghcr.io/akdasa-studios/lectorium-$service:${{ env.VERSION }}
docker tag ghcr.io/akdasa-studios/lectorium-$service:${{ env.VERSION }}-rc ghcr.io/akdasa-studios/lectorium-$service:latest
docker push ghcr.io/akdasa-studios/lectorium-$service:${{ env.VERSION }}
docker push ghcr.io/akdasa-studios/lectorium-$service:latest
done
publish-mobile:
name: Publish / ${{ matrix.config.name }}
runs-on: ubuntu-latest
needs: [deploy-production, build-mobile-production]
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- config:
name: Android
- config:
name: iOS
steps:
- name: Publish App
run: |
echo "Running E2E tests"
echo "Tests passed"