From b2a48b0f937625b9ecace0bc13040f94499da2fc Mon Sep 17 00:00:00 2001 From: alexjmpb Date: Tue, 7 Mar 2023 23:04:19 -0500 Subject: [PATCH] feat: adding image building action to the workflow --- .github/workflows/build-push-image-main.yml | 30 ++++++++++++++++++++ .github/workflows/build-push-image-stage.yml | 30 ++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/build-push-image-main.yml create mode 100644 .github/workflows/build-push-image-stage.yml diff --git a/.github/workflows/build-push-image-main.yml b/.github/workflows/build-push-image-main.yml new file mode 100644 index 00000000000..77a7ca0c863 --- /dev/null +++ b/.github/workflows/build-push-image-main.yml @@ -0,0 +1,30 @@ +name: Tutor Build Action Test + +on: + push: + branches: + - 'pearson-release/olive.main' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Get current time + uses: josStorer/get-current-time@v2 + id: current-time + with: + format: YYYY-MM-DD-HH-mm + - name: Build Image + uses: Pearson-Advance/tutor-build-image-action@0.2.0 + with: + python-version: ${{ vars.BUILD_PYTHON_VERSION }} + tutor-version: ${{ vars.BUILD_TUTOR_VERSION }} + path-image-to-be-built: 'env/plugins/ecommerce/build/ecommerce' + repository-name: ${{ vars.BUILD_MAIN_REPOSITORY_NAME }} + image-name: ${{ vars.BUILD_MAIN_IMAGE_NAME }} + image-tag: ${{ vars.ECOMMERCE_TUTOR_PLUGIN_VERSION }}-${{ steps.current-time.outputs.formattedTime }} + docker-username: ${{ secrets.DOCKERHUB_USERNAME }} + docker-token: ${{ secrets.DOCKERHUB_TOKEN }} + use-docker-cache: ${{ vars.BUILD_USE_CACHE }} + tutor-plugin-sources: '("git+https://github.com/overhangio/tutor-ecommerce.git@v${{ vars.ECOMMERCE_TUTOR_PLUGIN_VERSION }}" "git+https://github.com/overhangio/tutor-mfe.git@v15.0.5" "git+https://github.com/overhangio/tutor-discovery.git@v15.0.0")' + tutor-plugin-names: '("ecommerce" "discovery" "mfe")' diff --git a/.github/workflows/build-push-image-stage.yml b/.github/workflows/build-push-image-stage.yml new file mode 100644 index 00000000000..4f446875f91 --- /dev/null +++ b/.github/workflows/build-push-image-stage.yml @@ -0,0 +1,30 @@ +name: Tutor Build Action Test + +on: + push: + branches: + - 'pearson-release/olive.stage' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Get current time + uses: josStorer/get-current-time@v2 + id: current-time + with: + format: YYYY-MM-DD-HH-mm + - name: Build Image + uses: Pearson-Advance/tutor-build-image-action@0.2.0 + with: + python-version: ${{ vars.BUILD_PYTHON_VERSION }} + tutor-version: ${{ vars.BUILD_TUTOR_VERSION }} + path-image-to-be-built: 'env/plugins/ecommerce/build/ecommerce' + repository-name: ${{ vars.BUILD_STAGE_REPOSITORY_NAME }} + image-name: ${{ vars.BUILD_STAGE_IMAGE_NAME }} + image-tag: ${{ vars.ECOMMERCE_TUTOR_PLUGIN_VERSION }}-RC-${{ steps.current-time.outputs.formattedTime }} + docker-username: ${{ secrets.DOCKERHUB_USERNAME }} + docker-token: ${{ secrets.DOCKERHUB_TOKEN }} + use-docker-cache: ${{ vars.BUILD_USE_CACHE }} + tutor-plugin-sources: '("git+https://github.com/overhangio/tutor-ecommerce.git@v${{ vars.ECOMMERCE_TUTOR_PLUGIN_VERSION }}" "git+https://github.com/overhangio/tutor-mfe.git@v15.0.5" "git+https://github.com/overhangio/tutor-discovery.git@v15.0.0")' + tutor-plugin-names: '("ecommerce" "discovery" "mfe")'