auto-recipe-update #12
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
name: auto-recipe-update | |
on: | |
schedule: | |
- cron: '0 1 * * 2-5' | |
workflow_dispatch: | |
jobs: | |
update: | |
name: Recipe Update | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Setup Yocto Dependencies | |
run: | | |
sudo apt install gawk wget git diffstat unzip texinfo gcc \ | |
build-essential chrpath socat cpio python3 python3-pip \ | |
python3-pexpect xz-utils debianutils iputils-ping python3-git \ | |
python3-jinja2 xterm python3-subunit zstd liblz4-tool | |
git config --global user.name aws-iot-embedded-linux-ci | |
git config --global user.email [email protected] | |
git clone git://git.yoctoproject.org/poky -b $GITHUB_REF_NAME | |
git clone https://github.com/openembedded/meta-openembedded.git -b $GITHUB_REF_NAME | |
- name: Clone Our Layer | |
uses: actions/checkout@v3 | |
with: | |
ref: master-next | |
path: meta-aws | |
fetch-depth: 0 | |
- name: Clone CI Tolls Repo | |
uses: actions/checkout@v3 | |
with: | |
path: ci | |
repository: 'aws4embeddedlinux/meta-aws-ci' | |
ref: master | |
- name: Install Helper Tool | |
run: | | |
pip install ci/auto-upgrader | |
- name: Run Update | |
run: | | |
source poky/oe-init-build-env build | |
bitbake-layers add-layer ../meta-openembedded/meta-oe | |
bitbake-layers add-layer ../meta-openembedded/meta-python | |
bitbake-layers add-layer ../meta-openembedded/meta-multimedia | |
bitbake-layers add-layer ../meta-openembedded/meta-networking | |
bitbake-layers add-layer ../meta-aws | |
upgrader update --layer-path ../meta-aws | |
- name: Push Result | |
working-directory: meta-aws | |
run: | | |
cat ../build/branches.txt | xargs -n1 git push origin | |
- name: Create Pulls | |
working-directory: meta-aws | |
env: | |
GITHUB_TOKEN: ${{ secrets.BOT_CREDENTIAL }} | |
run: | | |
upgrader create-pulls --branch-file=../build/branches.txt --repo=${{ github.repository }} --target-branch="$GITHUB_REF_NAME-next" --delay 300 | |
- name: Publish Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: updated-recipes | |
path: | | |
./build/result.json | |
./build/upgrader.log | |
./build/branches.txt |