Skip to content

Update ncsref-update.yaml #570

Update ncsref-update.yaml

Update ncsref-update.yaml #570

name: Build and Test
on:
workflow_dispatch:
inputs:
build_all:
description: Build all configurations
type: boolean
required: true
default: false
devices:
description: Devices to test, json list
type: string
required: true
default: '[\"thingy91x\"]'
schedule:
- cron: "0 0 * * *"
push:
branches:
- main
paths-ignore:
- "docs/**"
jobs:
setup:
runs-on: ubuntu-latest
outputs:
devices: ${{ steps.setup.outputs.devices }}
build_all: ${{ steps.setup.outputs.build_all == 'true' }}
push_memory_badges: ${{ steps.setup.outputs.push_memory_badges == 'true' }}
steps:
- name: Setup
id: setup
run: |
SCHEDULED=${{ github.event_name == 'schedule' }}
PUSH=${{ github.event_name == 'push' }}
push_memory_badges=false
if [[ $SCHEDULED == true ]]; then
devices='["thingy91x","nrf9151dk","ppk_thingy91x"]'
build_all=true
push_memory_badges=true
elif [[ $PUSH == true ]]; then
devices='["thingy91x"]'
build_all=false
else
devices=${{ inputs.devices }}
build_all=${{ inputs.build_all }}
fi
echo "devices=$devices"
echo "build_all=$build_all"
echo "push_memory_badges=$push_memory_badges"
echo "devices=$devices" >> $GITHUB_OUTPUT
echo "build_all=$build_all" >> $GITHUB_OUTPUT
echo "push_memory_badges=$push_memory_badges" >> $GITHUB_OUTPUT
build:
needs: setup
uses: ./.github/workflows/build.yml
secrets: inherit
with:
build_all: ${{ needs.setup.outputs.build_all == 'true' }}
push_memory_badges: ${{ needs.setup.outputs.push_memory_badges == 'true' }}
test:
permissions:
actions: read
contents: write
packages: read
uses: ./.github/workflows/target-test.yml
needs: [build, setup]
secrets: inherit
with:
artifact_fw_version: ${{ needs.build.outputs.version }}
artifact_run_id: ${{ needs.build.outputs.run_id }}
devices: ${{ needs.setup.outputs.devices }}
test_all: ${{ needs.setup.outputs.build_all == 'true' }}