droidian docker-images #1346
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
# droidian docker images build definition for GitHub Actions | |
# Contact: Eugenio "g7" Paolantonio <[email protected]> | |
name: droidian docker-images | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "59 23 * * *" | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: true | |
matrix: | |
arch: [amd64, armhf, arm64] | |
template: [build-essential, rootfs-builder, aptly-intake] | |
dist: [current, next] | |
namespace: [droidian] | |
exclude: | |
- template: aptly-intake | |
arch: armhf | |
name: ${{ matrix.template }}:${{ matrix.dist }} on ${{ matrix.arch }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: APT update | |
run: sudo apt update | |
- name: QEMU set-up | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
with: | |
install: true | |
- name: Build | |
run: ./src/build_docker_image.sh "${{ matrix.arch }}/${{ matrix.namespace }}/${{ matrix.template }}:${{ matrix.dist }}" | |
- name: Deploy | |
if: "${{ github.ref == 'refs/heads/master' }}" | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: ./src/push_docker_image.sh "${{ matrix.arch }}/${{ matrix.namespace }}/${{ matrix.template }}:${{ matrix.dist }}" | |
- name: Deploy versioned image | |
if: "${{ github.ref == 'refs/heads/master' && matrix.template == 'build-essential' }}" | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: ./src/push_docker_image.sh "${{ matrix.arch }}/${{ matrix.namespace }}/${{ matrix.template }}:${{ matrix.dist }}" versioned |