Skip to content

Remove defunct missing apt.matrix.one mirror and libmatrixio-creator-… #26

Remove defunct missing apt.matrix.one mirror and libmatrixio-creator-…

Remove defunct missing apt.matrix.one mirror and libmatrixio-creator-… #26

name: Build and push toolchain images
on:
push:
branches:
- master
paths:
- toolchain/**
- .github/workflows/build-toolchains.yml
jobs:
build:
if: ${{ startsWith(github.repository, 'WebThingsIO/') }}
runs-on: ubuntu-latest
strategy:
matrix:
language: [
'node:8',
'node:10',
'node:12',
'node:14',
'python:3.5.10',
'python:3.6.12',
'python:3.7.9',
'python:3.8.6',
'python:3.9.0',
]
platform: [
'linux-arm',
'linux-arm64',
'linux-x64',
]
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt -qq update
sudo apt install --no-install-recommends -y \
binfmt-support \
qemu \
qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Build and push images
run: |
echo "${{ secrets.DOCKER_HUB_PAT }}" | docker login -u "${{ secrets.DOCKER_HUB_USER }}" --password-stdin
language=$(echo ${{ matrix.language }} | cut -d: -f1)
version=$(echo ${{ matrix.language }} | cut -d: -f2)
short_version=$(echo $version | cut -d. -f 1-2)
toolchain="toolchain/${{ matrix.platform }}"
image=$(echo "$toolchain" | sed 's/\//-/g')
image=${image}-${language}-${short_version}
if [ $language = node ]; then
docker build --build-arg NODE_VERSION=${version} -t ${image} ${toolchain}/${language}
else
docker build --build-arg PYTHON_VERSION=${version} -t ${image} ${toolchain}/${language}
fi
docker tag ${image} webthingsio/${image}:latest
docker push webthingsio/${image}:latest