generated from mlibrary/python-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from mlibrary/DWI-24-continuous-deployment
DWI-24 Set up continuous deployment
- Loading branch information
Showing
6 changed files
with
119 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Deploy release | ||
|
||
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-digifeeds: | ||
needs: build-production | ||
name: Deploy to production - digifeeds | ||
uses: mlibrary/platform-engineering-workflows/.github/workflows/deploy.yml@v1 | ||
with: | ||
image: ghcr.io/mlibrary/${{ vars.IMAGE_NAME }}:${{ github.event.release.tag_name }} | ||
file: environments/digifeeds/production/app-image.txt | ||
CONFIG_REPO_RW_APP_ID: ${{ vars.CONFIG_REPO_RW_APP_ID }} | ||
CONFIG_REPO_FULL_NAME: ${{ vars.CONFIG_REPO_FULL_NAME }} | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Docker Build Main and Deploy to Workshop | ||
|
||
on: | ||
workflow_run: | ||
workflows: [ 'Run Tests' ] | ||
branches: [ main ] | ||
types: [ completed ] | ||
|
||
jobs: | ||
build-unstable: | ||
name: Build unstable ${{ github.sha }} | ||
uses: mlibrary/platform-engineering-workflows/.github/workflows/build-unstable.yml@v1 | ||
with: | ||
image_name: ${{ vars.IMAGE_NAME }} | ||
tag: ${{ github.sha }} | ||
dockerfile: Dockerfile | ||
secrets: inherit | ||
|
||
deploy-workshop-digifeeds: | ||
needs: build-unstable | ||
name: "Deploy to workshop - digifeeds" | ||
uses: mlibrary/platform-engineering-workflows/.github/workflows/deploy.yml@v1 | ||
with: | ||
image: ${{ needs.build-unstable.outputs.image }} | ||
file: environments/digifeeds/workshop/app-image.txt | ||
CONFIG_REPO_RW_APP_ID: ${{ vars.CONFIG_REPO_RW_APP_ID }} | ||
CONFIG_REPO_FULL_NAME: ${{ vars.CONFIG_REPO_FULL_NAME }} | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Build unstable image | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: tag | ||
required: true | ||
|
||
jobs: | ||
build-unstable: | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Manual Deploy to Production | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: tag | ||
required: true | ||
|
||
|
||
jobs: | ||
build-production: | ||
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-digifeeds: | ||
needs: build-production | ||
name: Deploy to production - digifeeds | ||
uses: mlibrary/platform-engineering-workflows/.github/workflows/deploy.yml@v1 | ||
with: | ||
image: ghcr.io/mlibrary/${{ vars.IMAGE_NAME }}:${{ github.event.inputs.tag }} | ||
file: environments/digifeeds/production/app-image.txt | ||
CONFIG_REPO_RW_APP_ID: ${{ vars.CONFIG_REPO_RW_APP_ID }} | ||
CONFIG_REPO_FULL_NAME: ${{ vars.CONFIG_REPO_FULL_NAME }} | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters