Skip to content

Add artifact paths

Add artifact paths #1

Workflow file for this run

name: update Mbedtls to the latest version
on:
schedule: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
- cron: '0 1 * * 1' # run every monday at 01:00
workflow_dispatch: # allow manual triggering if needed
push:
branches:
- mbedtls-3.4.1
jobs:
get-latest-mbedtls-version:
runs-on: ubuntu-latest
outputs:
mbedtlsVersion: ${{ steps.step1.outputs.mbedtlsVersion }}
steps:
- id: step1
run: |
echo -n "mbedtlsVersion=" >> "$GITHUB_OUTPUT"
curl -s https://api.github.com/repos/Mbed-TLS/mbedtls/releases/latest | jq -r '.tag_name' | grep -o '[^v]\+' >> "$GITHUB_OUTPUT"
compile-mbedtls:
needs: [ get-latest-mbedtls-version ]
uses: ./.github/workflows/compile-mbedtls.yml
with:
mbedtlsVersion: ${{ needs.get-latest-mbedtls-version.outputs.mbedtlsVersion }}
create-pr:
name: Create a PR with new mbedtls binaries
needs: [ get-latest-mbedtls-version, compile-mbedtls ]
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: linux-x86-64
path: mbedtls-lib/bin/linux-x86-64/
- uses: actions/download-artifact@v3
with:
name: darwin
path: mbedtls-lib/bin/darwin/
- uses: actions/download-artifact@v3
with:
name: win32-x86-64
path: mbedtls-lib/bin/darwin/win32-x86-64/
- name: Generate PR description
run: |
PR_DESCRIPTION=$(cat build/dependencyUpdates/report.txt | grep -A 1000 'have later milestone versions')
echo "PR_DESCRIPTION<<EOF" >> $GITHUB_ENV
cat build/dependencyUpdates/report.txt | grep -A 1000 'have later milestone versions' >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo '```' >> $GITHUB_STEP_SUMMARY
cat build/dependencyUpdates/report.txt | grep -A 1000 'have later milestone versions' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
branch: update-mbedtls
delete-branch: true
commit-message: Update Mbedtls
title: 🏗️️ Update Mbedtls to ${{ needs.get-latest-mbedtls-version.outputs.mbedtlsVersion }}
body: |
Update MbedTLS version to ${{ needs.get-latest-mbedtls-version.outputs.mbedtlsVersion }}
----
Auto-generated by [update-mbedtls workflow][1]
[1]: https://github.com/nRFCloud/provisioning/actions/workflows/update-mbedtls.yml