Skip to content

⏰ Scheduled build #55

⏰ Scheduled build

⏰ Scheduled build #55

Workflow file for this run

name: Docker CI
run-name: ${{ github.event_name == 'schedule' && '⏰ Scheduled build' || github.event.head_commit.message }}
on:
schedule:
- cron: '0 0 * * *'
push:
branches: [ master ]
env:
SECRET_DOCKER_CI: ${{ secrets.DOCKER_CI }}
REPOSITORY: hyperion-project
jobs:
Docker:
name: 🐧 ${{ matrix.dockerOS }} ${{ matrix.dockerTag }} ${{ matrix.description }}
runs-on: ubuntu-latest
strategy:
matrix:
dockerImage: [ x86_64, armv6l, armv7l, aarch64 ]
dockerTag: [ buster, bullseye, bookworm ]
include:
- dockerImage: x86_64
dockerOS: Debian
description: (x86_64)
- dockerImage: armv6l
dockerOS: Debian
description: (Raspberry Pi v1 & ZERO)
- dockerImage: armv7l
dockerOS: Debian
description: (Raspberry Pi 2, 3 & 4)
- dockerImage: aarch64
dockerOS: Debian
description: (Generic AARCH64)
steps:
- name: 👀 Checkout
uses: actions/checkout@v3
- name: ✅ Determine current Repository
if: ${{ !startsWith(github.repository, env.REPOSITORY) }}
run: echo "REPOSITORY=$(echo '${{ github.actor }}' | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV}
- name: 👷 Build and 📝 Tag Docker image
run: docker build -t ghcr.io/${{ env.REPOSITORY }}/${{ matrix.dockerImage }}:${{ matrix.dockerTag }} --build-arg SUITE=${{ matrix.dockerTag }} --build-arg REPOSITORY="${{ github.server_url }}/${{ env.REPOSITORY }}" -f ${{ matrix.dockerImage }} .
- name: 🚀 Publish to GitHub Container/Package Registry
if: ${{ env.SECRET_DOCKER_CI != null }}
run: |
echo ${{ secrets.DOCKER_CI }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker push ghcr.io/${{ env.REPOSITORY }}/${{ matrix.dockerImage }}:${{ matrix.dockerTag }}