Skip to content

Commit

Permalink
Adding workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
bertrama committed Nov 1, 2024
1 parent e42f12f commit e97e601
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build-deploy-on-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and Deploy Production

on:
release:
types: [ released ]

jobs:
build-production:
name: Build production ${{ github.event.release.tag_name }}
uses: mlibrary/platform-engineering-workflows/.github/workflows/build-production.yml@v1
with:
image_name: ${{ vars.IMAGE_NAME }}
tag: ${{ github.event.release.tag_name }}
dockerfile: Dockerfile
secrets: inherit


deploy-production:
needs: build-production
name: Deploy to production
uses: mlibrary/platform-engineering-workflows/.github/workflows/deploy.yml@v1
with:
image: ghcr.io/mlibrary/${{ vars.IMAGE_NAME }}:${{ github.event.release.tag_name }}
file: ${{ vars.CONFIG_REPO_PRODUCTION_IMAGE_FILE }}
CONFIG_REPO_RW_APP_ID: ${{ vars.CONFIG_REPO_RW_APP_ID }}
CONFIG_REPO_RW_INSTALL_ID: ${{ vars.CONFIG_REPO_RW_INSTALL_ID }}
CONFIG_REPO_FULL_NAME: ${{ vars.CONFIG_REPO_FULL_NAME }}
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/build-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,15 @@ jobs:
tag: ${{ github.sha }}
dockerfile: Dockerfile
secrets: inherit

deploy-testing:
needs: build-unstable
name: Deploy to testing
uses: mlibrary/platform-engineering-workflows/.github/workflows/deploy.yml@v1
with:
image: ${{ needs.build-unstable.outputs.image }}
file: ${{ vars.CONFIG_REPO_TESTING_IMAGE_FILE }}
CONFIG_REPO_RW_APP_ID: ${{ vars.CONFIG_REPO_RW_APP_ID }}
CONFIG_REPO_RW_INSTALL_ID: ${{ vars.CONFIG_REPO_RW_INSTALL_ID }}
CONFIG_REPO_FULL_NAME: ${{ vars.CONFIG_REPO_FULL_NAME }}
secrets: inherit
31 changes: 31 additions & 0 deletions .github/workflows/manual-deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Manual deploy production

on:
workflow_dispatch:
inputs:
tag:
description: Release
required: true


jobs:
build-production:
name: Build production ${{ github.event.inputs.tag }}
uses: mlibrary/platform-engineering-workflows/.github/workflows/build-production.yml@v1
with:
image_name: ${{ vars.IMAGE_NAME }}
tag: ${{ github.event.inputs.tag }}
dockerfile: Dockerfile
secrets: inherit

deploy-production:
needs: build-production
name: Deploy to production
uses: mlibrary/platform-engineering-workflows/.github/workflows/deploy.yml@v1
with:
image: ghcr.io/mlibrary/${{ vars.IMAGE_NAME }}:${{ github.event.inputs.tag }}
file: ${{ vars.CONFIG_REPO_PRODUCTION_IMAGE_FILE }}
CONFIG_REPO_RW_APP_ID: ${{ vars.CONFIG_REPO_RW_APP_ID }}
CONFIG_REPO_RW_INSTALL_ID: ${{ vars.CONFIG_REPO_RW_INSTALL_ID }}
CONFIG_REPO_FULL_NAME: ${{ vars.CONFIG_REPO_FULL_NAME }}
secrets: inherit
30 changes: 30 additions & 0 deletions .github/workflows/manual-deploy-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Manual deploy workshop

on:
workflow_dispatch:
inputs:
tag:
description: tag
required: true

jobs:
build-unstable:
name: Build unstable ${{ github.event.inputs.tag }}
uses: mlibrary/platform-engineering-workflows/.github/workflows/build-unstable.yml@v1
with:
image_name: ${{ vars.IMAGE_NAME }}
tag: ${{ github.event.inputs.tag }}
dockerfile: Dockerfile
secrets: inherit

deploy:
needs: build-unstable
name: Deploy to ${{ github.event.inputs.tanka_env }}
uses: mlibrary/platform-engineering-workflows/.github/workflows/deploy.yml@v1
with:
image: ${{ needs.build-unstable.outputs.image }}
file: ${{ vars.CONFIG_REPO_TESTING_IMAGE_FILE }}
CONFIG_REPO_RW_APP_ID: ${{ vars.CONFIG_REPO_RW_APP_ID }}
CONFIG_REPO_RW_INSTALL_ID: ${{ vars.CONFIG_REPO_RW_INSTALL_ID }}
CONFIG_REPO_FULL_NAME: ${{ vars.CONFIG_REPO_FULL_NAME }}
secrets: inherit

0 comments on commit e97e601

Please sign in to comment.