From ecb016f03cc133b86aa1d0abf1d8a00e119763a5 Mon Sep 17 00:00:00 2001 From: Andrew Dryga Date: Mon, 12 Jun 2023 12:33:31 -0600 Subject: [PATCH] Lave a note on workflow_run feature and fix checkout feature --- .github/workflows/cd.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 0b7775ad4..ba52b167d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,8 +1,9 @@ name: Continuous Delivery on: workflow_run: - workflows: - - Elixir + # Note: if you use multiple workflows here only one will be required + # to trigger the deployment. + workflows: ["Elixir"] branches: - master - cloud @@ -33,6 +34,8 @@ jobs: with: terraform_version: ${{ env.TERRAFORM_VERSION }} - uses: actions/checkout@v3 + with: + ref: ${{ github.event.workflow_run.head_branch }} - name: "Update Application Tags" run: | sed -ri 's/^(\s*)(api_image_tag\s*=\s*"[^"]*"\s*$)/api_image_tag = "${{ github.sha }}"/' ../terraform/environments/staging/versions.auto.tfvars