Skip to content

Set ouputs step after checkout #3

Set ouputs step after checkout

Set ouputs step after checkout #3

Workflow file for this run

name: Build
on:
push:
branches:
- main
- ci
pull_request:
branches:
- main
env:
# Customize the CMake build
BUILD_TYPE: Release # Release, Debug, RelWithDebInfo
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clean workspace
run: |
echo "Cleaning up previous run"
rm -rf "${{ github.workspace }}"
mkdir -p "${{ github.workspace }}"
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout PicoBoot code
uses: actions/checkout@v4
- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- uses: robinraju/release-downloader@v1
id: gekkoboot-download
with:
repository: 'redolution/gekkoboot'
latest: true
fileName: '*.zip'
out-file-path: gekkoboot
extract: true
- name: Copy gekkoboot uf2 payload
run: |
cd gekkoboot
if [ -f "gekkoboot_pico.uf2" ]; then
cp gekkoboot_pico.uf2 ${{ github.workspace }}/payload.uf2
elif [ -f "iplboot_pico.uf2" ]; then
cp iplboot_pico.uf2 ${{ github.workspace }}/payload.uf2
else
echo "Neither gekkoboot_pico.uf2 nor iplboot_pico.uf2 found."
exit 1
fi
- name: Build and run Dev Container task
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/webhdx/picoboot
runCmd: |
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .
make
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: picoboot-${{ steps.vars.outputs.sha_short }}
path: |
picoboot_full.uf2
picoboot.uf2
payload.uf2