From f7b926f8ce6c990aeb17d17fd5f83b157445fb4f Mon Sep 17 00:00:00 2001 From: Alessandro Lo Manto Date: Wed, 20 Mar 2024 16:57:15 +0100 Subject: [PATCH 1/2] Automatically deploy to stage default branch --- .github/workflows/push-dev-docker-images.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/push-dev-docker-images.yml b/.github/workflows/push-dev-docker-images.yml index e003b0fa5..055344ff4 100644 --- a/.github/workflows/push-dev-docker-images.yml +++ b/.github/workflows/push-dev-docker-images.yml @@ -54,3 +54,10 @@ jobs: tags: | ${{ env.DOCKER_REPOSITORY }}:${{ env.DOCKER_IMAGE_TAG }} ${{ env.DOCKER_REPOSITORY }}:${{ env.DOCKER_IMAGE_TAG_WITH_DATE }} + - + if: github.ref == 'refs/heads/{{ github.event.repository.default_branch }}' + name: Send Webhook to deploy automatically to stage + run: | + echo '{"sqsdockerversion":"${{ env.DOCKER_REPOSITORY }}:${{ env.DOCKER_IMAGE_TAG }}"}' > temp.json + jq -s '.[0] * .[1]' config.json temp.json > combined_config.json + curl -H "Content-Type: application/json" -X POST -d @combined_config.json ${{ secrets.DEPLOY_URL }} \ No newline at end of file From 6fb25942ca0ac18be9adde09205963695a90c6cd Mon Sep 17 00:00:00 2001 From: Alessandro Lo Manto Date: Wed, 20 Mar 2024 16:59:07 +0100 Subject: [PATCH 2/2] Fix typo --- .github/workflows/push-dev-docker-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-dev-docker-images.yml b/.github/workflows/push-dev-docker-images.yml index 055344ff4..f84dc6c7d 100644 --- a/.github/workflows/push-dev-docker-images.yml +++ b/.github/workflows/push-dev-docker-images.yml @@ -60,4 +60,4 @@ jobs: run: | echo '{"sqsdockerversion":"${{ env.DOCKER_REPOSITORY }}:${{ env.DOCKER_IMAGE_TAG }}"}' > temp.json jq -s '.[0] * .[1]' config.json temp.json > combined_config.json - curl -H "Content-Type: application/json" -X POST -d @combined_config.json ${{ secrets.DEPLOY_URL }} \ No newline at end of file + curl -H "Content-Type: application/json" -X POST -d @combined_config.json ${{ secrets.DEPLOY_URL }}