From cdf0c0d31f3709c211bb38d30b581ac2ff06fbda Mon Sep 17 00:00:00 2001 From: digorgonzola <29941279+digorgonzola@users.noreply.github.com> Date: Sat, 30 Dec 2023 01:07:58 +1100 Subject: [PATCH] test trigger --- .github/workflows/build-development.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-development.yml b/.github/workflows/build-development.yml index aefacb3..93a8d50 100644 --- a/.github/workflows/build-development.yml +++ b/.github/workflows/build-development.yml @@ -13,9 +13,16 @@ jobs: build_test_push: runs-on: ubuntu-latest environment: development + outputs: + image_digest: ${{ steps.echo.outputs.image_digest }} steps: -# - name: Checkout -# uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 + + - name: echo + id: echo + run: | + echo "image_digest=latest" >> "$GITHUB_OUTPUT" # # - name: Set up QEMU # uses: docker/setup-qemu-action@v3 @@ -73,12 +80,19 @@ jobs: # push: true # tags: ${{ vars.ECR_REGISTRY }}/${{ vars.ECR_REPOSITORY }}:${{ steps.set_image_tag.outputs.image_tag }} + trigger_deploy: + runs-on: ubuntu-latest + needs: [build_test_push] + permissions: + contents: write + steps: - uses: actions/create-github-app-token@v1 id: app-token with: app-id: ${{ vars.DEPLOY_APP_ID }} private-key: ${{ secrets.DEPLOY_APP_PRIVATE_KEY }} owner: ${{ github.repository_owner }} + repositories: "appdeploy" - name: Trigger Deploy Workflow uses: actions/github-script@v7 @@ -94,7 +108,7 @@ jobs: inputs: { app_name: 'sample-django-app', environment: 'development', - image_tag: 'latest', + image_tag: '${{ needs.build_test_push.outputs.image_digest }}', terragrunt_action: 'apply' }, })