From 587a81857a122128a20790d2906e0b6c99e3c325 Mon Sep 17 00:00:00 2001 From: Monique Rio Date: Fri, 20 Sep 2024 15:46:58 +0000 Subject: [PATCH] trying a couple actions --- .github/workflows/build-main.yml | 28 +++++++++++++++++++ .github/workflows/manual-deploy-workshop.yaml | 22 ++++++++++++--- 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build-main.yml diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml new file mode 100644 index 0000000..1dadace --- /dev/null +++ b/.github/workflows/build-main.yml @@ -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-default: + needs: build-unstable + name: "Deploy to workshop - default" + uses: mlibrary/platform-engineering-workflows/.github/workflows/deploy.yml@v1 + with: + image: ${{ needs.build-unstable.outputs.image }} + file: environments/default/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 diff --git a/.github/workflows/manual-deploy-workshop.yaml b/.github/workflows/manual-deploy-workshop.yaml index 87ab9c3..8cb2c2a 100644 --- a/.github/workflows/manual-deploy-workshop.yaml +++ b/.github/workflows/manual-deploy-workshop.yaml @@ -8,7 +8,21 @@ on: required: true jobs: - echo: - runs-on: ubuntu-latest - steps: - - run: echo "${{ github.event.inputs.tag }}" + 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 + + deploy-workshop-digifeeds: + needs: build-unstable + name: Deploy to workshop - default + uses: mlibrary/platform-engineering-workflows/.github/workflows/deploy.yml@0654fcf173d868b670f4ac283e4f8fceec6f299c + 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