Skip to content

Commit

Permalink
fix: dependabot failures due to no secrets
Browse files Browse the repository at this point in the history
Dependabot does not get passed secrets. Just don't run the
actions that require secrets if they aren't passed in.
  • Loading branch information
elasticspoon committed May 14, 2024
1 parent 031c94d commit e47424a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/combine_and_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
find artifacts -name "test_reports*.zip" -exec unzip -d test_reports {} \;
find test_reports -name "**/test_reports*.zip" -exec unzip -d test_reports {} \;
- name: Merge parallel runtime log parts
if: github.repository == github.event.pull_request.head.repo.full_name
if: env.AZURE_STORAGE_KEY != ''
run: |
cat artifacts/**/parallel_runtime_rspec*.log > parallel_runtime.log
- name: Upload log file to Azure Blob Storage
if: github.repository == github.event.pull_request.head.repo.full_name
env:
AZURE_STORAGE_KEY: ${{ secrets.STORAGE_ACCESS_KEY }}
AZURE_STORAGE_ACCOUNT: ${{ secrets.ACCOUNT_NAME }}
STORAGE_CONTAINER: ${{ secrets.STORAGE_CONTAINER }}
if: env.AZURE_STORAGE_KEY != ''
run: |
az storage blob upload \
-c $STORAGE_CONTAINER \
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ jobs:
- uses: actions/checkout@v4

- name: Download parallel runtime log from Azure Blob Storage
if: github.repository == github.event.pull_request.head.repo.full_name
env:
AZURE_STORAGE_KEY: ${{ secrets.STORAGE_ACCESS_KEY }}
AZURE_STORAGE_ACCOUNT: ${{ secrets.ACCOUNT_NAME }}
STORAGE_CONTAINER: ${{ secrets.STORAGE_CONTAINER }}
if: env.AZURE_STORAGE_KEY != ''
run: |
echo $STORAGE_CONTAINER
echo ${{ secrets.STORAGE_CONTAINER }}
az storage blob download \
-c $STORAGE_CONTAINER \
--file old_parallel_runtime.log \
Expand Down Expand Up @@ -116,6 +114,7 @@ jobs:
--runtime-log old_parallel_runtime.log \
--verbose-command ./spec
echo 'Tests completed. Uploading to Code Climate'
./cc-test-reporter after-build --exit-code $?
cat tmp/spec_summary.log
Expand All @@ -124,7 +123,7 @@ jobs:
zip -r test_reports_${{ env.GROUPS_UNDERSCORE }}.zip tmp/reports
- name: Compress log
if: github.repository == github.event.pull_request.head.repo.full_name
if: env.AZURE_STORAGE_KEY != ''
run: |
mv tmp/parallel_runtime.log parallel_runtime_rspec_${{ env.GROUPS_UNDERSCORE }}.log
Expand All @@ -135,7 +134,7 @@ jobs:
path: test_reports_${{ env.GROUPS_UNDERSCORE }}.zip

- name: Upload file parallel tests runtime log
if: github.repository == github.event.pull_request.head.repo.full_name
if: env.AZURE_STORAGE_KEY != ''
uses: actions/upload-artifact@v4
with:
name: parallel_runtime_rspec_${{ env.GROUPS_UNDERSCORE }}.log
Expand Down

0 comments on commit e47424a

Please sign in to comment.