Skip to content

Commit 55464e8

Browse files
authored
Fix secrets usage (#21)
For security reasons, secrets are not automatically passed to reusable workflows: https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows#passing-inputs-and-secrets-to-a-reusable-workflow This patch enables passing secrets to workflow with tests.
1 parent 729ea6a commit 55464e8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
test:
4848
needs: ["create-semantic-tag"]
4949
uses: "./.github/workflows/test.yml"
50+
secrets: "inherit"
5051

5152
build:
5253
needs: ["test"]

.github/workflows/test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,9 @@ jobs:
5555

5656
- name: "Upload coverage to badge"
5757
if: "${{ github.ref_name == github.event.repository.default_branch }}"
58-
env:
59-
BADGEN_TOKEN: ${{ secrets.BADGEN_TOKEN }}
6058
run: |
6159
RESULT=$(grep -E 'total:\s+\(statements\)\s+[0-9]+\.[0-9]+%' coverage.log | grep -Eo '[0-9]+\.[0-9]+%' | sed 's/%/%25/g')
62-
curl -LX PUT --header "Authorization: Bearer ${BADGEN_TOKEN}" \
60+
curl -LX PUT --header "Authorization: Bearer ${{ secrets.BADGEN_TOKEN }}" \
6361
"https://badgen.net/memo/tarantool-sdvg-coverage-master/coverage/${RESULT}/green"
6462
6563
### PERFORMANCE ###

0 commit comments

Comments
 (0)