pass secrets to reusable workflows

This commit is contained in:
MicroDev 2023-02-15 21:25:56 +05:30
parent cfea7c1d69
commit 9de039b625
No known key found for this signature in database
GPG Key ID: 2C0867BE60967730
3 changed files with 16 additions and 8 deletions

View File

@ -6,14 +6,17 @@ on:
platform:
required: true
type: string
boards:
required: true
type: string
cp-version:
required: true
type: string
secrets:
AWS_ACCESS_KEY_ID:
required: false
AWS_SECRET_ACCESS_KEY:
required: false
jobs:
build:

View File

@ -6,6 +6,11 @@ on:
cp-version:
required: true
type: string
secrets:
AWS_ACCESS_KEY_ID:
required: false
AWS_SECRET_ACCESS_KEY:
required: false
jobs:
build:

View File

@ -96,15 +96,14 @@ jobs:
with:
cp-version: ${{ needs.scheduler.outputs.cp-version }}
mpy-cross:
needs: scheduler
if: needs.scheduler.outputs.build-boards == 'True'
uses: ./.github/workflows/build-mpy-cross.yml
secrets: inherit
with:
cp-version: ${{ needs.scheduler.outputs.cp-version }}
mpy-cross-mac:
runs-on: macos-11
needs: scheduler
@ -223,41 +222,41 @@ jobs:
[ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi"
[ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/*
aarch:
needs: [scheduler, mpy-cross, tests]
if: ${{ needs.scheduler.outputs.boards-aarch != '[]' }}
uses: ./.github/workflows/build-boards.yml
secrets: inherit
with:
platform: aarch
boards: ${{ needs.scheduler.outputs.boards-aarch }}
cp-version: ${{ needs.scheduler.outputs.cp-version }}
arm:
needs: [scheduler, mpy-cross, tests]
if: ${{ needs.scheduler.outputs.boards-arm != '[]' }}
uses: ./.github/workflows/build-boards.yml
secrets: inherit
with:
platform: arm
boards: ${{ needs.scheduler.outputs.boards-arm }}
cp-version: ${{ needs.scheduler.outputs.cp-version }}
esp:
needs: [scheduler, mpy-cross, tests]
if: ${{ needs.scheduler.outputs.boards-esp != '[]' }}
uses: ./.github/workflows/build-boards.yml
secrets: inherit
with:
platform: esp
boards: ${{ needs.scheduler.outputs.boards-esp }}
cp-version: ${{ needs.scheduler.outputs.cp-version }}
riscv:
needs: [scheduler, mpy-cross, tests]
if: ${{ needs.scheduler.outputs.boards-riscv != '[]' }}
uses: ./.github/workflows/build-boards.yml
secrets: inherit
with:
platform: riscv
boards: ${{ needs.scheduler.outputs.boards-riscv }}
@ -267,6 +266,7 @@ jobs:
needs: [scheduler, mpy-cross, tests]
if: ${{ needs.scheduler.outputs.boards-rpi != '[]' }}
uses: ./.github/workflows/build-boards.yml
secrets: inherit
with:
platform: arm
boards: ${{ needs.scheduler.outputs.boards-rpi }}