From dbf598e8fbcb5f6e8a4c51efb8454e2ffa585394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Sat, 3 Feb 2024 00:23:04 +0100 Subject: [PATCH] hotfix --- .github/workflows/deploy_production.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy_production.yml b/.github/workflows/deploy_production.yml index 08634b96..e25189c1 100644 --- a/.github/workflows/deploy_production.yml +++ b/.github/workflows/deploy_production.yml @@ -71,7 +71,7 @@ jobs: run: | echo "terraform_plan<> "$GITHUB_OUTPUT" echo "$ terraform plan" >> "$GITHUB_OUTPUT" - terraform plan -no-color || echo "failed to run terraform plan" >> "$GITHUB_OUTPUT" + terraform plan -no-color >> "$GITHUB_OUTPUT" echo "EOF" >> "$GITHUB_OUTPUT" continue-on-error: true @@ -80,7 +80,7 @@ jobs: run: | echo "terraform_apply<> "$GITHUB_OUTPUT" echo "$ terraform apply -auto-approve" >> "$GITHUB_OUTPUT" - terraform apply -auto-approve -no-color || echo "failed to run terraform apply" >> "$GITHUB_OUTPUT" + terraform apply -auto-approve -no-color >> "$GITHUB_OUTPUT" echo "EOF" >> "$GITHUB_OUTPUT" continue-on-error: true @@ -92,8 +92,12 @@ jobs: git config --global user.name "OONI Github Actions Bot" git add . >> "$GITHUB_OUTPUT" git commit -m "skip-terraform: autoupdate terraform outputs" || echo "No changes to commit" >> "$GITHUB_OUTPUT" - git push -u origin ${{ github.head_ref }} >> "$GITHUB_OUTPUT" + BRANCH_NAME="${GITHUB_REF#refs/heads/}" + git push -u origin "${BRANCH_NAME}" >> "$GITHUB_OUTPUT" echo "EOF" >> "$GITHUB_OUTPUT" + env: + GITHUB_REF: ${{ github.ref }} + GITHUB_HEAD_REF: ${{ github.head_ref }} continue-on-error: true - uses: actions/github-script@v6