From e59b65b86313c29398298fd4d6ae943a14d69c01 Mon Sep 17 00:00:00 2001 From: Joe George Date: Wed, 18 Sep 2024 10:43:11 -0400 Subject: [PATCH] Use github.ref_name instead of hardcoded branch name (#4085) --- .github/workflows/coverage.yml | 4 ++-- .github/workflows/docs.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 4473cabbb..a6fe52117 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -36,9 +36,9 @@ jobs: license: ${{ secrets.REPORT_GENERATOR_LICENSE }} - name: Sync Coverage Report to S3 - run: aws s3 sync ./coveragereport s3://${{ secrets.AWS_S3_BUCKET }}/csharp/main/coverage --delete + run: aws s3 sync ./coveragereport s3://${{ secrets.AWS_S3_BUCKET }}/csharp/${{ github.ref_name }}/coverage --delete env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: us-east-1 - if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' + if: github.event_name == 'push' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c97b5f485..a95d7514e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -23,9 +23,9 @@ jobs: ./build.sh --doc - name: Sync to S3 - run: aws s3 sync ./docfx/_site s3://${{ secrets.AWS_S3_BUCKET }}/csharp/main/api --delete + run: aws s3 sync ./docfx/_site s3://${{ secrets.AWS_S3_BUCKET }}/csharp/${{ github.ref_name }}/api --delete env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: us-east-1 - if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' + if: github.event_name == 'push'