Docker Build All and Push #2
Workflow file for this run
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: Docker Build All and Push | |
on: | |
workflow_dispatch: | |
jobs: | |
generate-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set Matrix | |
id: set-matrix | |
run: | | |
echo "matrix=$(python3 bin/generate_matrix.py submittyrpi true)" >> $GITHUB_OUTPUT | |
- name: List Matrix | |
run: | | |
echo ${{ steps.set-matrix.outputs.matrix }} | |
docker: | |
needs: | |
- generate-matrix | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker Hub login | |
uses: docker/login-action@releases/v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME_SUBMITTYRPI }} | |
password: ${{ secrets.DOCKER_PASSWORD_SUBMITTYRPI }} | |
- name: Build and push docker | |
uses: docker/build-push-action@v4 | |
with: | |
context: ${{ matrix.context }} | |
push: true | |
tags: ${{ matrix.tags }} | |
platforms: linux/amd64,linux/arm64 | |