From 5459f83a079b3556590675cdb5d56011679bd9b5 Mon Sep 17 00:00:00 2001 From: Brice Redmond Date: Thu, 7 Nov 2024 14:31:45 -0800 Subject: [PATCH] [patch] use proper secret for gha (#1085) # Pull Request Template ## Description Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. Fixes # (issue) ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Unit test - [ ] Integration test ## JS Budget Check Please mention the size in kb before abd after this PR | Files | Before | After | | ----------- | ----------- | ----------- | | dist/build.js. | | | | dist/build.min.js| | | ## Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules - [ ] I have checked my code and corrected any misspellings ## Mentions: List the person or team responsible for reviewing proposed changes. cc @BranchMetrics/saas-sdk-devs for visibility. --- .github/workflows/build-push.yml | 13 +++++++------ .github/workflows/deploy-release.yml | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 3516be24..be4cf724 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -13,11 +13,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Add INPUT_SHA env var - run: | - export INPUT_SHA=$(git rev-parse ${{ github.event.inputs.ref }}) - echo "INPUT_SHA=`echo $INPUT_SHA`" >> $GITHUB_ENV - - name: Install Node ${{ env.NODE_VERSION }} uses: actions/setup-node@v3 with: @@ -79,7 +74,13 @@ jobs: repository: BranchMetrics/branch-github-actions ref: master path: .branch-github-actions - token: ${{ secrets.BRANCHLET_ACCESS_TOKEN }} + token: ${{ secrets.BRANCHLET_ACCESS_TOKEN_PUBLIC }} + + - name: Add INPUT_SHA env var + if: ${{ github.ref == 'refs/heads/master' }} + run: | + export INPUT_SHA=$(git rev-parse ${{ github.ref }}) + echo "INPUT_SHA=`echo $INPUT_SHA`" >> $GITHUB_ENV - name: Get next release version if: ${{ github.ref == 'refs/heads/master' }} diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index 01dd2e52..928aeb79 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -37,7 +37,7 @@ jobs: repository: BranchMetrics/branch-github-actions ref: master path: .branch-github-actions - token: ${{ secrets.BRANCHLET_ACCESS_TOKEN }} + token: ${{ secrets.BRANCHLET_ACCESS_TOKEN_PUBLIC }} - name: Get next release version uses: actions/github-script@v7