From c8f9f5f99e917bdc4914c50d24dfb9196ea75323 Mon Sep 17 00:00:00 2001 From: Alfredo Date: Tue, 17 Dec 2024 15:05:26 +0100 Subject: [PATCH] using secret token --- .github/workflows/tests.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9bd526d..19aa173 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,9 +43,8 @@ jobs: - name: Upload changes to base branch run: | HEAD_REF="${{ github.head_ref }}" - if [ "$HEAD_REF" != "main" ]; then - git config user.name "github-actions" - git config user.email "github-actions@github.com" - git commit -am "deno formatting" - git push - fi + BRANCH_TO_PUSH="${HEAD_REF:-main}" + git config user.name "github-actions" + git config user.email "github-actions@github.com" + git commit -am "deno formatting" + git push https://x-access-token:${{ secrets.AWSF_PUSH_MAIN }}@github.com/${{ github.repository }} "$BRANCH_TO_PUSH"