Skip to content

toaster-container build and test #120

toaster-container build and test

toaster-container build and test #120

name: toaster-container build and test
on:
push:
branches:
- master
pull_request:
# Allow for manually running
workflow_dispatch:
# Run at 03:12 UTC every Saturday
schedule:
- cron: '12 3 * * 6'
jobs:
build-test-deploy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# BRANCH is the actual branch/tag in the github repo
# DOCKERHUB_TAGs are the tags to use for the REPO when pushing to dockerhub
# POKYBRANCH is the branch of poky selected by toaster to use during tests.
- repo: crops/toaster-dunfell
branch: dunfell
dockerhub_tag: latest
pokybranch: dunfell
- repo: crops/toaster-kirkstone
branch: kirkstone
dockerhub_tag: latest
pokybranch: kirkstone
- repo: crops/toaster-mickledore
branch: mickledore
dockerhub_tag: latest
pokybranch: mickledore
- repo: crops/toaster-master
branch: master
dockerhub_tag: latest
pokybranch: master
env:
# FLOATING_REPO is the dockerhub repo that can change what it's tracking
# currently it's kirkstone, but on the next release it will
# match the new release
# LATEST_RELEASE_REPO is the dockerhub repo that FLOATING_REPO should
# match
FLOATING_REPO: crops/toaster
LATEST_RELEASE_REPO: crops/toaster-kirkstone
REPO: ${{ matrix.repo }}
BRANCH: ${{ matrix.branch }}
DOCKERHUB_TAG: ${{ matrix.dockerhub_tag }}
POKYBRANCH: ${{ matrix.pokybranch }}
GITREPO: git://git.yoctoproject.org/poky
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Run Python commands
run: |
pip install --upgrade pip virtualenv
python3.8 -m venv env
source env/bin/activate
echo "VIRTUAL ENV:" $VIRTUAL_ENV
# For annotate-output
- name: pre-install
run: sudo apt-get update && sudo apt-get install -y devscripts
# Build the image
- name: build
run: |
annotate-output docker build --build-arg GITREPO="${GITREPO}" --build-arg BRANCH="${BRANCH}" -t ${REPO} .
# Test the image
- name: test
run: |
cd tests; SELENIUM_TIMEOUT=600 IMAGE=${REPO}:${DOCKERHUB_TAG} SHOW_LOGS_ON_FAILURE=1 source ./runtests.sh
# Deploy the images
- name: deploy
run: bash deploy.sh