docker: Update OS image to Buster Legacy 2023-05-03. #81
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: Deploy main branch & test builds | |
on: | |
push: | |
branches: [main, ci] | |
jobs: | |
deploy: | |
name: Deploy master tag images | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'ci-skip') && !contains(github.event.head_commit.message, 'skip-ci')" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CR_PAT }} | |
- name: Set current date to env variable $DATE_YYYY_MM_DD | |
id: date | |
run: echo "DATE_YYYY_MM_DD=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: Build base image (with expanded fs, otherwise is too small) | |
run: docker build -t ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master --build-arg FILE_SUFFIX=autologin-ssh-expanded . | |
- name: Tag same base image with date | |
run: docker tag ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master-${{ env.DATE_YYYY_MM_DD }} | |
- name: Build Mu image | |
run: docker build -t ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master-mu --build-arg FILE_SUFFIX=mu . | |
- name: Push all tags to ghcr.io | |
run: | | |
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master-${{ env.DATE_YYYY_MM_DD }} | |
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master-mu | |
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master | |
# This check is not valid, will probably delete soon | |
check-action-container: | |
name: Attempt to bash into container master tag | |
needs: deploy | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master | |
options: "--entrypoint /entrypoint.sh" | |
steps: | |
- run: uname -a | |
check-ssh: | |
name: SSH sample master tag | |
needs: deploy | |
runs-on: ubuntu-latest | |
services: | |
rpios: | |
image: ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master | |
ports: | |
- 5022:5022 | |
steps: | |
- name: Give 2m30s for the docker image to start up QEMU and Raspberry Pi OS | |
run: sleep 150 | |
- name: Executing remote ssh command 1 | |
uses: appleboy/ssh-action@v1.0.0 | |
with: | |
host: rpios | |
username: pi | |
password: raspberry | |
port: ${{ job.services.rpios.ports[5022] }} | |
# QEMU might still take some extra time to start up Raspberry Pi OS | |
timeout: 5m | |
script: | | |
uname -a | |
cat /etc/os-release | |
touch my_file.txt | |
df -h | |
- name: Executing remote ssh command 2 (check state permanence) | |
uses: appleboy/ssh-action@v1.0.0 | |
with: | |
host: rpios | |
username: pi | |
password: raspberry | |
port: ${{ job.services.rpios.ports[5022] }} | |
script: | | |
uname -a | |
cat /etc/os-release | |
ls | |
test -f my_file.txt && echo "Previously created file exists." | |
check-ssh-mu: | |
name: SSH sample master-mu tag | |
needs: deploy | |
runs-on: ubuntu-latest | |
services: | |
rpios: | |
image: ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master-mu | |
ports: | |
- 5022:5022 | |
steps: | |
- name: Give 2m30s for the docker image to start up QEMU and Raspberry Pi OS | |
run: sleep 150 | |
- name: Executing remote ssh command 1 | |
uses: appleboy/ssh-action@v1.0.0 | |
with: | |
host: rpios | |
username: pi | |
password: raspberry | |
port: ${{ job.services.rpios.ports[5022] }} | |
# QEMU might still take some extra time to start up Raspberry Pi OS | |
timeout: 5m | |
script: | | |
uname -a | |
cat /etc/os-release | |
touch my_file.txt | |
df -h | |
- name: Executing remote ssh command 2 (check state permanence) | |
uses: appleboy/ssh-action@v1.0.0 | |
with: | |
host: rpios | |
username: pi | |
password: raspberry | |
port: ${{ job.services.rpios.ports[5022] }} | |
script: | | |
uname -a | |
cat /etc/os-release | |
ls | |
test -f my_file.txt && echo "Previously created file exists." | |
- name: Check the Mu packages are present | |
uses: appleboy/ssh-action@v1.0.0 | |
with: | |
host: rpios | |
username: pi | |
password: raspberry | |
port: ${{ job.services.rpios.ports[5022] }} | |
script: | | |
dpkg -s python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtserialport python3-pyqt5.qtsvg |