nightly #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow runs nighly builds for each package. Jobs don't run concurrently | |
# to avoid performance issues on remote builders and also having a huge queue | |
# in the pipeline. That's why each job depends on each other through "needs". | |
name: nightly | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
schedule: | |
- cron: '0 1 * * 0' # every sunday at 1am | |
jobs: | |
prepare: | |
runs-on: ubuntu-20.04 | |
outputs: | |
matrix: ${{ steps.projects.outputs.matrix }} | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Create matrix | |
id: projects | |
run: | | |
projects=$(find ./pkg -maxdepth 1 -type d -printf '%P ') | |
projects=$(echo $projects | jq -cR 'split(" ")') | |
echo "matrix=$projects" >>${GITHUB_OUTPUT} | |
- | |
name: Show matrix | |
run: | | |
echo ${{ steps.projects.outputs.matrix }} | |
build: | |
uses: ./.github/workflows/.release.yml | |
needs: | |
- prepare | |
strategy: | |
fail-fast: false | |
max-parallel: 1 | |
matrix: | |
project: ${{ fromJson(needs.prepare.outputs.matrix) }} | |
with: | |
name: ${{ matrix.project }} | |
envs: | | |
NIGHTLY_BUILD=1 | |
secrets: inherit |